Hi
I 'm trying to add dynamic rows to a table layout
I current have an image button (to add)
and then it runs the code
....
TextView txt02 = new TextView(row.getContext());
txt02.setId(102000 + table.getChildCount() + 1);
txt02.setTextSize(TypedValue.COMPLEX_UNIT_PT, 10);
txt02.setText("Description");
txt02.setWidth(400);
txt02.setHeight(20);
row.addView(txt02);
....
to add all the elements in this new row and then adds the row to the table.
I would prefer to us the layout new_row.xml which has
<TableRow
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/invNewRow"
android:layout_margin="2dp">
<EditText
android:id="@+id/invName"
android:text="Description"
style="@style/EditFont.Black"
android:layout_margin="2dp"
android:background="#FFFFFF"
android:layout_width="400dp"
android:layout_height="20dp" />
....
....
....
</TableRow>
I need to interact with each of the elements, so the first element might be a
spinner to select and item code
and then fill in the Description based on the spinner value etc...
Thanks in advance
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en