Skip to content Skip to sidebar Skip to footer

Getapplicationcontext() Throws An Exception When Used

I've specified a class, based on another one in an existing Android project. The addRow() method is supposed to dynamically add rows to a table. When creating a new TextView to add

Solution 1:

I guess you have to pass the context to the constructor of your class.

Solution 2:

Try this instead:

TableRow tr = new TableRow(this);

Post a Comment for "Getapplicationcontext() Throws An Exception When Used"