如何自定义操作模式的颜色和文字?自定义、颜色、模式、文字

由网友(长街短梦。)分享简介:默认的操作模式(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 cust...

默认的操作模式(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>
阅读全文

相关推荐

最新文章