android设置全屏

两种方法:
方法一:

?
public void onCreate(Bundle savedInstanceState) { super .onCreate(savedInstanceState); //设置无标题 requestWindowFeature(Window.FEATURE_NO_TITLE); //设置全屏 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); }

  方法二:

?
<?xml version= "1.0" encoding= "utf-8" ?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" package = "com.andyidea" android:versionCode= "1" android:versionName= "1.0" > <uses-sdk android:minSdkVersion= "8" /> <application android:icon= "@drawable/icon" android:label= "@string/app_name" > <activity android:name= ".login.LoginActivity" android:theme= "@android:style/android.NoTitleBar.Fullscreen" android:label= "@string/app_name" > <intent-filter> <action android:name= "android.intent.action.MAIN" /> <category android:name= "android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

更多相关文章

  1. Mainfest
  2. Android(安卓)Studio 3.0找不到Android(安卓)Device Monitor的解
  3. android 5.1 usb调试默认关闭设置方法
  4. 图表(APAndroidChart)
  5. 手机壁纸设置相关
  6. Android--ListView滑动时出现黑屏解决方法(整合)
  7. Android(安卓)listview中使用button解决方法
  8. 在AndroidManifest.xml文件中的android:windowSoftInputMode属性
  9. [置顶] 调用Android发短信接口Intent.ACTION_SENDTO

随机推荐

  1. Android安卓开发 HttpURLConnection使用
  2. android获取文件大小常用类
  3. Android:StartActivies(Intent[] intents
  4. ObjectAnimators 动画的暂停与重新开始
  5. Android(安卓)7.0 CTS问题CtsShortcutHos
  6. Minimum SDK、Target SDK、Compile SDK区
  7. popuwindow
  8. 关于android编译失败的集中情况
  9. webView 夜间模式
  10. ch05 Android布局