Adding view at run time..

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Adding view at run time..

Postby Abhishek » Fri Jun 26, 2009 1:43 pm

first i add a table layout...thr xml file...
and add some rows with text view..
then i want to add some rows and view at run time.....using for loop as i want to add 3 rows....but i ma getting run time error...

TableLayout tb=(TableLayout)findViewById(;

for(int i=0;i<3;i++)
TableRow t=(TableRow)findViewById(;

Junior Developer
Junior Developer
Posts: 13
Joined: Tue Jun 23, 2009 10:07 am


Postby Emmanuel7 » Fri Jun 26, 2009 10:11 pm

This is what I'm doing for that :

TableRow CurRow = new TableRow( WordProspectorActivity );
<... Stuff with the row ...>
Senior Developer
Senior Developer
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 2 guests