Remove Text Padding In Button View
I would like to remove the padding around text in Button view. The first screenshot is the result I would achieve, and the second one is the state of the art. Of course, I have d
Solution 1:
Its not actually padding but the theme is setting a minHeight and minWidth for button widgets. You can completely remove this effect without changing your theme by setting the following on your button in the xml:
android:minHeight="0dp"android:minWidth="0dp"
It thus also implies that you can play around with different settings for different effects, 0dp is merely an example to completely remove this effect.
Solution 2:
you can try using android:includeFontPadding. set it to false. also set the padding to 0.
Solution 3:
Button text doesn't need padding, it is by default in center of the button.
I think you are using the android:theme="@android:style/Theme.Black.NoTitleBar"
in the manifest file, please remove it and use native app Theme and try it.
Post a Comment for "Remove Text Padding In Button View"