android - Material 主题 Android Action Bar 样式生成器

标签 android android-actionbar material-design

是否有适用于 Material 主题的 Android 操作栏样式生成器?

我正在寻找类似的东西 http://jgilfelt.github.com/android-actionbarstylegenerator/但支持 Android 的新 Material 样式(不是 Holo 样式)。

感谢您的提前:)

最佳答案

如工具中所述:

已弃用:考虑使用 Toolbar或其 support library equivalent .

使用 AppCompat 库并在 styles.xml 中设置这些值

<style name="Theme.MyTheme" parent="Theme.AppCompat.Light">
    <!-- colorPrimary is used for the default action bar background -->
    <item name="colorPrimary">@color/my_color</item>

    <!-- colorPrimaryDark is used for the status bar -->
    <item name="colorPrimaryDark">@color/my_darker_color</item>

    <!-- colorAccent is used as the default value for colorControlActivated, which is used to tint widgets -->
    <item name="colorAccent">@color/accent</item>

    <!-- You can also set colorControlNormal, colorControlActivated
         colorControlHighlight, and colorSwitchThumbNormal. -->

</style>

关于android - Material 主题 Android Action Bar 样式生成器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28125122/

相关文章:

android - 使用android :elevation在LinearLayout顶部转换阴影

android - Firestore 时间戳为空

java - 为什么 .setImageBitmap() 不将图像分配给 ImageView 对象?

android - Soundpool 和三星 Galaxy S 的问题

android - ActionBar 后退箭头/按钮未出现

Android:调整操作栏溢出菜单下拉的位置

android - 如何使用 Material Design Android 实现这个自定义弹出菜单?

java - 如何知道图像文件的类型

android - 操作栏中的矩形图标

Angular Material 2 : How to refresh md-table after add data to datasource?