Button 安卓自定义按钮没有理由变小了

Button 安卓自定义按钮没有理由变小了,button,customization,font-size,android-styles,Button,Customization,Font Size,Android Styles,我在Android中定义了一个自定义按钮 这是my styles.xml: 这是我的自定义按钮.xml: 应用自定义背景效果不错,但现在所有按钮都变小了,按钮的标题也变小了。为什么?如何使它们与默认按钮完全相同,但只在另一个背景下显示?我发现了我的错误。我必须选择全息按钮样式作为父项: <style name="CustomButtonStyle" parent="@android:style/Widget.Holo.Button"> <item name="andro

我在Android中定义了一个自定义按钮

这是my styles.xml:

这是我的自定义按钮.xml:


应用自定义背景效果不错,但现在所有按钮都变小了,按钮的标题也变小了。为什么?如何使它们与默认按钮完全相同,但只在另一个背景下显示?

我发现了我的错误。我必须选择全息按钮样式作为父项:

<style name="CustomButtonStyle" parent="@android:style/Widget.Holo.Button">
    <item name="android:background">@drawable/custom_button</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/btn_custom_normal" />
    <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/btn_custom_disabled" />
    <item android:state_pressed="true" android:drawable="@drawable/btn_custom_pressed" />
    <item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/btn_custom_focused" />
    <item android:state_enabled="true" android:drawable="@drawable/btn_custom_normal" />
    <item android:state_focused="true" android:drawable="@drawable/btn_custom_disabled_focused" />
    <item android:drawable="@drawable/btn_custom_disabled" />
</selector>
<style name="CustomButtonStyle" parent="@android:style/Widget.Holo.Button">
    <item name="android:background">@drawable/custom_button</item>
</style>