1. 方法1:AndroidManifest.xml 里,Activity的 android:theme 指定为"@android :style/Theme.NoTitleBar.Fullscreen"

示例:

<applicationandroid:icon="@drawable/ic_launcher"android:label="@string/app_name"android:theme="@android:style/Theme.NoTitleBar.Fullscreen"><activityandroid:name=".MainActivity"><intent-filter><actionandroid:name="android.intent.action.MAIN"/><categoryandroid:name="android.intent.category.LAUNCHER"/></intent-filter></activity></application>

2. 方法2: 在onCreate()里指定No title
要加入:

/*setittobenotitle*/requestWindowFeature(Window.FEATURE_NO_TITLE);/*setittobefullscreen*/getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);


示例:

publicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);/*setittobenotitle*/requestWindowFeature(Window.FEATURE_NO_TITLE);/*setittobefullscreen*/getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);setContentView(R.layout.activity_main);


更多相关文章

  1. Android 导入多个外部静态链接库, 进行动态库编译方法( NDK)
  2. Android横竖屏切换时,不重新onCreate()的方法
  3. Android软键盘弹出不影响布局的方法
  4. Android 实现图片轮播的三种方法
  5. Android三种实现定时器的方法
  6. Android 强制停止RecyclerView滑动方法
  7. Android ApiDemos示例解析(130):Views->Layout Animation->5.Gri
  8. Android 禁止转屏的方法
  9. android应用去掉title bar 及全屏处理方法

随机推荐

  1. android 添加 iconv 支持
  2. Android(安卓)获取Root权限 详细图解
  3. Busybox for android
  4. Android 中 ScrollView 的基本使用
  5. android中Textview如何限制在一行显示且
  6. android Material
  7. 引用 Android的DTMF处理(ToneGenerator)
  8. Android Bundle类(简单实例)
  9. Android上使用Chrome DevTools 远程调试W
  10. Android SystemProperty