Android实现隐藏状态栏和标题栏
更新时间:2015年06月08日 17:31:53 投稿:hebedich
这篇文章主要介绍了Android实现隐藏状态栏和标题栏的相关资料,需要的朋友可以参考下
隐藏标题栏需要使用预定义样式:android:theme=”@android:style/Theme.NoTitleBar”.
隐藏状态栏:android:theme=”@android:style/Theme.NoTitleBar.Fullscreen”.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.vogella.android.temperature"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Convert"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="9" />
</manifest>
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// hide titlebar of application
// must be before setting the layout
requestWindowFeature(Window.FEATURE_NO_TITLE);
// hide statusbar of Android
// could also be done later
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
text = (EditText) findViewById(R.id.EditText01);
}
以上所述就是本文的全部内容了,希望大家能够喜欢。
相关文章
Android Handler runWithScissors 梳理流程解析
这篇文章主要为大家介绍了Android Handler runWithScissors 梳理流程解析,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪2022-10-10
Android开发之Android studio的安装与使用
本文是此系列文章的第一篇,主要给大家讲述的是Android studio的安装与使用,十分的详细,有需要的小伙伴可以参考下2016-02-02
Android Location服务之LocationManager案例详解
这篇文章主要介绍了Android Location服务之LocationManager案例详解,本篇文章通过简要的案例,讲解了该项技术的了解与使用,以下就是详细内容,需要的朋友可以参考下2021-08-08
Android OkHttp实现全局过期token自动刷新示例
本篇文章主要介绍了Android OkHttp实现全局过期token自动刷新示例,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧2018-03-03
详谈Android中Matrix的set、pre、post的区别
下面小编就为大家带来一篇详谈Android中Matrix的set、pre、post的区别。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧2017-04-04
Android布局ConstraintLayout代码修改约束及辅助功能
这篇文章主要为大家介绍了Android布局ConstraintLayout代码修改约束及辅助功能示例详解,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪2022-09-09


最新评论