自定义Actionbar样式
来源:互联网 发布:排序算法有几种 编辑:程序博客网 时间:2024/05/20 03:44
备注: Theme.Holo.xxx主题下TabBar Tab项,仅能显示标题,无法显示指定的图片,可以改为“Theme.Black”或“Theme.Light"
以下内容为转载:
1)、在res/values/styles目录下,使用的是Theme.Sherlock.Light.DarkActionBar
自定义的时候,只需要覆盖它的actionBarStyle即可:
<style name="AppBaseTheme" parent="Theme.Sherlock.Light.DarkActionBar"></style><!-- Application theme. --><style name="AppTheme" parent="AppBaseTheme"> <!-- All customizations that are NOT specific to a particular API-level can go here. --> <item name="actionBarStyle">@style/MyActionBarStyle</item></style> <style name="MyActionBarStyle" parent="@style/Widget.Sherlock.Light.ActionBar.Solid.Inverse"> <item name="background">@drawable/ab_custom_blue_holo_light</item></style>
当然,对应的字体颜色,图标颜色,菜单样式等等,都可能会变得不那么协调了,这需要多覆盖几项其它样式,比如字体颜色,图标的普通样式和按下样式等。
2)、在res/values-14/styles.xml下,只需要覆盖系统定义的即可:
<!-- Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. --> <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> <!-- API 14 theme customizations can go here. --> <item name="android:actionBarStyle">@style/MyActionBarStyle</item> </style> <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"></style> <style name="MyActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar"> <item name="android:background">@drawable/ab_custom_blue_holo_light</item> </style>
0 0
- 自定义Actionbar样式
- ActionBar自定义样式
- 自定义ActionBar样式
- android ActionBar自定义样式
- 自定义ActionBar文字样式
- 自定义ActionBar的样式
- android actionbar 自定义样式
- 自定义actionBar的样式
- 自定义actionbar 样式
- 自定义ActionBar风格和样式
- 自定义ActionBar风格和样式
- 自定义actionbar中tab的样式
- 【android自定义控件】LinearLayout定义ActionBar样式
- android:自定义actionbar样式和布局
- ActionBar详解之三(自定义样式)
- ActionBar样式
- ActionBar总结2_自定义action bar的样式
- 自定义ActionBar标题与菜单中的文字样式
- Activity的Launch mode详解 singleTask正解
- Python学习笔记(2)格式化字符串
- SQL Server 游标使用
- volatile关键字
- OpenCV中的内存泄露问题(cvLoadImage,cvCloneImage)
- 自定义Actionbar样式
- 泰勒级数及其应用
- TortoiseGit安装教程
- 约瑟夫问题
- iOS事件拦截处理
- hdu 1081 To The Max
- linux的wget命令
- 自定义QtCreator添加Ogre新建模板
- 编译时MSIL注入--实践Mono Cecil