Heya!
I dont understand why is this such a big issue in Android API (2.3.3).
Im creating a TableLayout, a TableRow and add things to the row, then add the row to the layout. Everything is cool, BUT:
Say for instance i have a TextView view. I add it to one row, and i want to add a copy of that object into my 2nd row.
What i usually do in Java:
ArrayList<String> textArray1 = new ArrayList<String>();
ArrayList<String> textArray2 = new ArrayList<String>();
String test = "Test";
textArray1.add(test);
textArray2.add(test);
Apparently, you cannot do this in Android API. When adding "test" to textArray2, you would get an exception saying "The specified child has already a parent".
Why cant i add a duplicate object to different rows? Say i have a label(TextView) saying "Income" and i want to use it as a name of a column in my table. It would be stupid to write 3-4-5 lines of same code, to add the same label "Income" for each row in the table.
What am i missing?
I dont understand why is this such a big issue in Android API (2.3.3).
Im creating a TableLayout, a TableRow and add things to the row, then add the row to the layout. Everything is cool, BUT:
Say for instance i have a TextView view. I add it to one row, and i want to add a copy of that object into my 2nd row.
What i usually do in Java:
ArrayList<String> textArray1 = new ArrayList<String>();
ArrayList<String> textArray2 = new ArrayList<String>();
String test = "Test";
textArray1.add(test);
textArray2.add(test);
Apparently, you cannot do this in Android API. When adding "test" to textArray2, you would get an exception saying "The specified child has already a parent".
Why cant i add a duplicate object to different rows? Say i have a label(TextView) saying "Income" and i want to use it as a name of a column in my table. It would be stupid to write 3-4-5 lines of same code, to add the same label "Income" for each row in the table.
What am i missing?



Granted Java SDK had YEARS of development, i feel that Android SDK is lacking lots of the things Java SDK have, that makes a coder's life so much easier hehe