tags:

views:

48

answers:

1

I would like to apply both an icon and text to a button. The button would have the icon centered in the button and text written at the bottom, centered. I could not get the text to center and be at the bottom using android:gravity.

A side note, for a layout with 6 buttons is a Table Layout the best way to do it? There is 3 rows and 2 columns. Thanks in advance.

Another side note, why does the button lose its rounded edges when I add background color?

+1  A: 

You can use android:drawableTop attribute to set drawable on the top and text on the bottom.

You should also use stateful drawables.

Megha Joshi