It took me forever to find this but the “padding” around the text in a button isn’t really padding at all. The default Widget.Button style includes a minHeight
property. Changing minHeight
on the button will allow you to adjust padding as expected.
<Button
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/test"
android:textColor="@color/black"
android:minHeight="40dip"/>
<style name="Widget.Holo.Button" parent="Widget.Button">
<item name="android:background">@android:drawable/btn_default_holo_dark</item>
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textColor">@android:color/primary_text_holo_dark</item>
<item name="android:minHeight">48dip</item>
<item name="android:minWidth">64dip</item>
</style>