如何自定义操作模式的颜色和文字? [英] How can I customize the Action Mode's color and text?

查看:227
本文介绍了如何自定义操作模式的颜色和文字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认的操作模式(3.0及以上),带有一个绿色的主题,在左侧完成按钮。我怎么可以自定义这些?

The default action mode (3.0 and up) comes with a green theme and a 'Done' button on the left side. How can I customize these?

感谢

推荐答案

这是用于任何ActionMode的风格,我从SDK把它。你需要创建自己的风格来定制它。这是很容易做到的。如果你从来没有做过这样的事,你应该仔细阅读这个帖子在自定义动作条。它说明了一切你需要知道的。

This is the style used for any ActionMode, I pulled it from the SDK. You'll need to create your own style to customize it. It's really easy to do. If you've never done anything like this before, you should read through this post on customizing the ActionBar. It explains everything you'll need to know.

    <style name="Widget.ActionMode">
    <item name="android:background">?android:attr/actionModeBackground</item>
    <item name="android:backgroundSplit">?android:attr/actionModeSplitBackground</item>
    <item name="android:height">?android:attr/actionBarSize</item>
    <item name="android:titleTextStyle">@android:style/TextAppearance.Widget.ActionMode.Title</item>
    <item name="android:subtitleTextStyle">@android:style/TextAppearance.Widget.ActionMode.Subtitle</item>
    </style>

这篇关于如何自定义操作模式的颜色和文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆