欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

Android隐藏状态栏和标题栏,相当于全屏效果,android全屏,隐藏标题栏需要使用预定义

来源: javaer 分享于  点击 16161 次 点评:250

Android隐藏状态栏和标题栏,相当于全屏效果,android全屏,隐藏标题栏需要使用预定义


隐藏标题栏需要使用预定义样式:android:[email&#160;protected]/ <![CDATA[ /!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/ ]]> /:style/Theme.NoTitleBar”.隐藏状态栏:android:[email&#160;protected]/ <![CDATA[ /!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/ ]]> /:style/Theme.NoTitleBar.Fullscreen”.``` xml<?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>`````` java@Overridepublic 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);

}```

相关栏目:

用户点评