I am working in android. i wanted to cleara layout each time i press a button and start everything again(as in doing "Reset") . Its not working with the following code.
final TableLayout rel=(TableLayout)findViewById(R.id.tab1);
int k=rel.getChildCount();
System.out.print("k is"+k);
for(int x=0;x<k; x++)
{
View v1 = rel.getChildAt(x);
rel.removeView(v1);
}
So i tried to print the value of k and i got it like 0101100 where i expected an integer. Any help is appreciated ..Thank you