Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Multiple rows in table not showing
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- TextView tv = null;
- while (i < 5) {
- TableRow trow = new TableRow(this);
- while (j < 3) {
- tv = new TextView(this);
- tv.setText(" " + j + i);
- tv.setTextColor(Color.BLACK);
- tv.setWidth(25);
- tv.setBackgroundColor(Color.WHITE);
- trow.addView(tv);
- j++;
- }
- Log.i("SS", "adding row for " + i + " time");
- this.addContentView(trow, new LayoutParams(
- LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
- i++;
- }
Add Comment
Please, Sign In to add comment