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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -