通过主题应用buttonStyle不起作用,直接应用完美

时间:2013-08-01 04:01:15

标签: android android-theme

我在将按钮样式应用于主题时遇到问题,但直接应用于按钮效果很好。知道这里有什么问题吗?

的themes.xml

<style name="Theme.AppTheme" parent="@style/Theme.Sherlock.Light.DarkActionBar">
    <item name="android:buttonStyle">@style/ButtonAppTheme</item>
</style>

styles.xml

<style name="ButtonAppTheme" parent="@android:style/Widget.Button">
        <item name="android:background">@drawable/btn_default_holo_light</item>
        <item name="android:minHeight">48dip</item>
        <item name="android:minWidth">64dip</item>
        <item name="android:textColor">#000000</item>
</style>

的AndroidManifest.xml

<Application
    android:name=".ThreesixtyusApp"
    android:allowBackup="true"
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:theme="@style/Theme.AppTheme" >

直接应用按钮样式:

  <Button
      android:id="@+id/like"
      android:layout_width="100dp"
      android:layout_height="wrap_content"
      style="@style/ButtonAppTheme"
      android:text="@string/like" />

1 个答案:

答案 0 :(得分:1)

这看起来生成了。您是否忘记了值-v11或values-v14文件夹中的样式/主题?

相关问题