【Android】修改Activity的标题样式
16lz
2021-01-26
- <!--Setsthetextstyles-->
- <?xmlversion="1.0" encoding= "utf-8" ?>
- <!--Setsthetextstyles-->
- <resources>
- <stylename="CustomWindowTitleText" parent= "android:TextAppearance.WindowTitle" >
- <itemname="android:textSize" >20dip</item>
- <itemname="android:textColor" >#5599FF</item>
- <itemname="android:textStyle" >bold|italic</item>
- </style>
- <!--Changesthebackgroundcolorofthetitlebar-->
- <stylename="CustomWindowTitleBackground" >
- <itemname="android:background" ># 222222 </item>
- </style>
- <!--Setthethemefor thewindowtitle-->
- <!--NOTE:settingandroid:textAppearencetostyledefinedabove-->
- <stylename="CustomWindowTitle" parent= "android:WindowTitle" >
- <itemname="android:textAppearance" > @style /CustomWindowTitleText</item>
- <itemname="android:shadowDx" > 0 </item>
- <itemname="android:shadowDy" > 0 </item>
- <itemname="android:shadowRadius" > 5 </item>
- <itemname="android:shadowColor" >#1155CC</item>
- </style>
- <!--Overridepropertiesinthedefault theme-->
- <!--NOTE:youmustexplicitlythewindowTitleSizeproperty,thetitlebarwillnotre-sizeautomatically,textwillbeclipped-->
- <stylename="CustomTheme" parent= "android:Theme" >
- <itemname="android:windowTitleSize" >40dip</item>
- <itemname="android:windowTitleStyle" > @style /CustomWindowTitle</item>
- <itemname="android:windowTitleBackgroundStyle" > @style /CustomWindowTitleBackground</item>
- </style>
- </resources>
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer