android5.1 android5.0 themes,styles用法介绍
2015-07-07 14:15
483 查看
android5.0后,从Holo主题到Material主题,动画效果和颜色设置都有了比较大的改善。下面介绍其用法。
android:colorPrimary
改变statusbar状态栏颜色
android:colorPrimaryDark
改变switch,checkbox,editText的选中状态颜色
android:colorAccent
改变listView分隔线颜色
android:colorForeground
点击效果的ripple波纹的颜色
android:colorControlHighlight介绍
兼容android5.1主题
在res里新建values-v21文件夹,新建styles.xml主题,在主题里继承parent=android:Theme.DeviceDefault.Light,黑色主题为Theme.DeviceDefault。全部主题可以在eclipse的graphical layout里找到。主要设置项介绍
改变actionbar颜色,listView边缘阴影效果android:colorPrimary
改变statusbar状态栏颜色
android:colorPrimaryDark
改变switch,checkbox,editText的选中状态颜色
android:colorAccent
改变listView分隔线颜色
android:colorForeground
点击效果的ripple波纹的颜色
android:colorControlHighlight介绍
相关文章推荐
- Android:No implementation found for native(转)
- Android屏幕适配全攻略(最权威的官方适配指导)
- android开发的一些建议
- Android 修改keystore文件密码、alias名称
- android 实现全屏代码
- android studio开发apk
- Android错误之Location of the Android SDK has not been setup in the preferences
- Android实现开机自动运行程序
- Android Monkey Log
- Android 开源框架Universal-Image-Loader完全解析(一)--- 基本介绍及使用
- Android 自定义View步骤
- android解析JSON数据样例
- 【转】Android编程判断手机or平板
- Android Studio设置代码风格
- Android SpannaleString详解
- android:windowSoftInputMode属性详解(解决软键盘弹出布局调整问题)
- Android Paint、Path详解
- Android 如何按返回键暂停异步任务
- Android ScrollView水平自动滚动
- android 编写content_provider对外共享数据