android theme
来源:互联网 发布:最好看的网络官场小说 编辑:程序博客网 时间:2024/05/29 16:10
主题Theme就是用来设置界面UI风格,可以设置整个应用或者某个活动Activity的界面风格。在Android SDK中内置了下面的Theme,可以按标题栏Title Bar和状态栏Status Bar是否可见来分类:
这些主题可以应用到整个应用Application范围或者某个活动Activity范围中。
应用Application范围
在AndroidManifest.xml中的application节点中设置theme属性,主题theme应用到整个应用程序中。
<application
Android:icon=”@drawable/icon”
Android:icon=”@string/app_name”
Android:icon=”@android:style/ Theme.Black.NoTitleBar”>
活动Activity范围
使用java代码或者在AndroidManifest.xml中对活动Activity的主题进行设置,主题仅应用到当前活动中。
在AndroidMainifest.xml设置方法:
<activity
android:name=“.About”
android:label=“@string/app_name”
android:theme=“@android:style/ Theme.Black.NoTitleBar” >
使用java代码进行设置,在当前活动Activity的onCreate中进行设置:
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setTheme(android.R.style.Theme_Translucent_NoTitleBar);
setContentView(R.layout.main);
}
- android:theme
- android:theme
- android theme
- Android:theme
- android theme
- Android Theme
- android theme
- android:theme
- android Theme
- android:theme
- Android:theme
- Android Theme
- Android Theme
- android:theme
- android:theme
- Android theme
- Android Theme
- android theme
- [Jenkins]HTML Report无法显示结果,返回HTTP ERROR 404
- bzoj 1613 dp
- svn删除已经上传的文件
- 基于DragonBoard 410c的家庭智能环保卫士——(4)A*路径搜索算法
- 高性能开发(1) Redis缓存主从配置详解
- android theme
- 经典排序算法代码
- jQuery的ajax传递时乱码解决
- Oracle用户创建及权限设置
- OGRE1.7.4显示中文字符串细节问题
- Qt字符串分离
- android adb修改build.prop
- hihoCoder 1473 小Ho的强迫症 && qdu 韬韬说蛤蛤蛤(基础gcd)
- POJ2431-Expedition(优先队列 + 贪心)