【发布时间】:2015-03-31 19:04:28
【问题描述】:
我正在尝试更新我的记事本应用以使用 Material Design,即使在旧设备上也是如此。
到目前为止我做了什么:
- 将库 appcompat_v7 添加到我的项目中,以支持旧设备上的 Material Design
- 修改AndroidManifest中的主题,将
android:theme="@style/Theme.NoteItTheme"添加到<application ... ></application>属性 -
在 /res/values/themes.xml 中创建主题:
<?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="Theme.NoteItTheme" parent="Theme.AppCompat.Light"> <!-- Here we setting appcompat’s actionBarStyle --> <!-- <item name="actionBarStyle">@style/MyActionBarStyle</item> --> <!-- ...and here we setting appcompat’s color theming attrs --> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary_dark</item> <item name="android:textColorPrimary">@color/text</item> <item name="colorAccent">@color/ui</item> <!-- The rest of your attributes --> </style>
问题:
您可以在这里更好地看到:
当我展开操作栏的菜单时,文本颜色和背景颜色非常相似。 我以前没有这个问题,如何只更改项目文本颜色?
【问题讨论】:
标签: android android-appcompat material-design