Wrapping a scrollview in a tablelayout in XML

Innoxeon

New Member
So, I create table view in XML to which the rows are added dynamically using the following java code:\[code\]private void fillTable(TableLayout tableLayout, String[] items) { for (int i = 0; i < items.length; i++) { TextView itemText = new TextView(FillingActivity.this); itemText.setText(items); TableRow row = new TableRow(FillingActivity.this); row.addView(itemText); if(i % 2 == 1) row.setBackgroundColor(color.LightGreen); tableLayout.addView(row); }}\[/code\]The code for a single tablelayout is the following:\[code\]<TableLayout android:id="@+id/dinnertableviewing" android:layout_width="346dp" android:layout_height="wrap_content" android:layout_x="2dp" android:layout_y="210dp" ></TableLayout>\[/code\]But then when add many items to that table it overlaps with the space for the next tableshere is a picture that shows it:
foryouss.png
 
Back
Top