Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reduce text padding inside a Button

Is ist possible to reduce the text padding inside a normal Android Button a bit, in order to reduce the button´s width?

Of course the whole text should be still visible.

like image 907
anonymous Avatar asked Jul 07 '12 22:07

anonymous


2 Answers

There're android:minHeight and android:minWidth attribute already set on a button. Make them 0dp or 1dp to make the background fit to the text.

like image 87
noob Avatar answered Sep 20 '22 05:09

noob


The "normal" Android button varies between themes, but you probably want to define a custom style for the button that inherits from your button of choice.

like image 34
Estel Avatar answered Sep 21 '22 05:09

Estel