安卓 - 更改底部按钮栏的文本颜色



我正在修改下载(对于 4.3 Jellybean),但我无法将底部按钮上的文本颜色从黑色更改为白色。是否可以通过在应用程序主题中添加项目来更改文本颜色而不赋予按钮自己的样式?这是我的风格.xml:

<style name="DownloadListTheme" parent="@android:style/Theme.DeviceDefault.Light.DialogWhenLarge">
   <item name="android:textAlignment">viewStart</item>
   <item name="android:layoutDirection">locale</item>
   <item name="android:actionBarStyle">@android:style/Widget.DeviceDefault.Light.ActionBar.Solid.Inverse</item>
   <item name="com.sonyericsson.uxp:extendedLookAndFeel">true</item>
   <item name="android:textColor">@android:color/white</item>
</style>

是的,您可以非常轻松地完成此操作,只需在样式中覆盖主题.xml如下所示:

<style name="MyButtonStyle"
   parent="@android:style/Theme.DeviceDefault.Light.DialogWhenLarge">
   <item name="android:textColor">@android:color/white</item>
</style>

有关详细信息,请参阅文档。

最新更新