change theme ? or just background
16lz
2021-12-04
You need to apply one of available themes to your application. You can do itAndroidManifest.xml, just useandroid:themeattribute:
android:theme="@android :style/Theme.Holo"if you want dark theme orandroid:theme="@android :style/Theme.Holo.Light"if you want light theme.
If you use put this app in one of your<activity>tags, only corresponding activity will be styled, if you put it in<application>tag, style will be applied to the whole application.
Of course, you can define your own style instyles.xml:
<style name="AppTheme" parent="android:Theme.Light"> <item name="android:windowBackground">@drawable/bg_window</item> <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> </style>
Here's the example ofAndroidManifest.xml:
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".Activity1" android:theme="@style/AppTheme2" /> <activity android:name=".Activity2" />
In this example,AppTheme2will be applied only toActivity1, whileAppThemewill be applied to all other activities.
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer