android - Get all TableRow's in a TableLayout -
i've been looking hours on how tablerow's in tablelayout. know how add , delete rows dynamically, need loop on rows , selectively delete of them.
i think can come work around, i'm trying avoid crude hacks in app.
have tried using getchildcount()
, getchildat(int)
respectively?
should easy in loop:
for(int = 0, j = table.getchildcount(); < j; i++) { view view = table.getchildat(i); if (view instanceof tablerow) { // then, can remove the row want... // instance... tablerow row = (tablerow) view; if( want check ) { table.removeviewat(i); // or... table.removeview(row); } } }
Comments
Post a Comment