views:

289

answers:

1

I need to have a grid (created by program, not by xml) of equally sized buttons. They display text in different sizes. The problem is that when I change the text size to a smaller size, then the button automatically resizes to be smaller than the others.

Thanks,

Note: the grid is created adding *TableRow*s of buttons to a TableLayout. The buttons are created and added to a TableRow

tr.addView(bu, 36, 45);
+1  A: 

Adding padding (setPadding()) will expand the button while keeping the font size small. Figuring out how much padding to add, though, is up to you.

CommonsWare