XML : child of child elements

Please can someone help, I have a number of rows in my TableLayout I want access the button views. Example as follows:

  <TableLayout>      <TableRow>          <Button />          <Button />      </TableRow>      <TableRow>          <Button />          <Button />      </TableRow>  </TableLayout>    

From the table layout I would like to loop through the buttons.

  TableLayout layout=(TableLayout) findViewById(R.id.Layout);  layout.getChildCount;     

The above only returns the number tablerow views.

No comments:

Post a Comment