您的位置:首页 > 移动开发 > Android开发

Android ThemeEditor 使用心得

2016-04-05 22:49 423 查看
Android themeEditor是一个快速定位Android样式的编辑工具,它提供了app的常用样式选择。
![属性列表](https://img-blog.csdn.net/20160405230320369)
![属性列表2](https://img-blog.csdn.net/20160405230352541)
![各个属性的作用位置](https://img-blog.csdn.net/20160405230214119)
通过点击属性列表的颜色,可以快速定制自己喜欢的APP样式。这里需要注意的是,在APP的manifest.xml文件中的theme属性


android:theme="@style/AppTheme"


需要注意AppTheme.的继承关系,本人当初就是不小心将AppTheme改成了其parent AppTheme.NoActionBar 结果,怎么设置属性都不起作用。另外,需要注意的是AppTheme 的继承关系在values21中另有一份属性。

<style name="AppTheme" parent="AppTheme.NoActionBar">
<item name="colorPrimary">@color/accent_material_light</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>
<item name="android:colorBackground">@color/abc_background_cache_hint_selector_material_light</item>
</style>
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: