Hi! I'm trying to create a 10x10 grid of TextViews using TableLayout. I want this grid fills the whole screen like this: http://files.getdropbox.com/u/1040020/right.png
But I get this: http://files.getdropbox.com/u/1040020/wrong.png My code: TableLayout layout = new TableLayout(this); for(int i=0; i < 10; i++) { TableRow row = new TableRow(this); for(int j=0; j < 10; j++) { TextView tv = new TextView(this); tv.setText(String.valueOf(i*10 + j + 1)); tv.setGravity(Gravity.CENTER); row.addView(tv); } layout.addView(row); } What am I doing wrong? Can I achieve the same effect doing another thing? (Other layouts, using fixed sizes for each TextView... whatever) Thank you in advance :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---