I want to create an android button with both an image and text, but the text is automatically centered. How do I place the text at the bottom of the button?
I know I can use relative layout to place a second text button underneath the image, but I prefer to minimize the code.
If I were you I would just not use a Button. Use LinearLayout, or RelativeLayout and just give it the Button background(Hint: use a selector if you want it to have different images for each state) and place your TextView inside of it, then you can use the drawableLeft, drawableTop etc.. attributes to put the picture on whichever side you want. If you want a greater level of control as to where the picture goes in relation to the text then use one TextView and one ImageView. Then in your java just get a reference to your layout and treat it just like you would a button, with setOnClickListener().