Android Application - No window title, Full screen, Landscape (横向显示)
2010-10-22 17:08
369 查看
1. 横向显示
android:screenOrientation="landscape" in AndroidManifest.xml
2. Set "No-Title": To add winStyle.xml in res/values
(代码编辑器有问题,改成图片插入)
android:them="@style/NoTitle" in AndroidManifest.xml
3. Full Screen
Add below line in java file:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
java file:
Screenshot:
android:screenOrientation="landscape" in AndroidManifest.xml
2. Set "No-Title": To add winStyle.xml in res/values
(代码编辑器有问题,改成图片插入)
android:them="@style/NoTitle" in AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sdt.mycheckbox" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".MyCheckBox" android:label="@string/app_name" android:screenOrientation = "landscape" android:theme="@style/NoTitle"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
3. Full Screen
Add below line in java file:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
java file:
package com.sdt.mycheckbox; import android.app.Activity; import android.os.Bundle; import android.view.WindowManager; public class MyCheckBox extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } }
Screenshot:
相关文章推荐
- android AlertDialog显示错误 Unable to add window token null is not for an application解决办法
- Android使用requestWindowFeature(Window.FEATURE_NO_TITLE)方法去除标题无效解决办法
- android AlertDialog显示错误 Unable to add window token null is not for an application
- android 取消标题 程序意外停止(this.requestWindowFeature(Window.FEATURE_NO_TITLE);)
- Android Studion的Monitor中显示No Debuggable Application的解决方法
- No resource found android:WindowTitleBackground
- 【Android】使用requestWindowFeature(Window.FEATURE_NO_TITLE)方法去除标题无效解决办法
- 在Android Stduio 中使用requestWindowFeature(Window.FEATURE_NO_TITLE)无效的解决方法
- Android设置requestWindowFeature(Window.FEATURE_NO_TITLE)无效的解决办法
- 今天记录一下小小的知识点--如何让你的Android应用没有标题 --- requestWindowFeature(Window.FEATURE_NO_TITLE);
- Android取消标题方法和this.requestWindowFeature(Window.FEATURE_NO_TITLE)App报错解决方法
- Android studio设置requestWindowFeature(Window.FEATURE_NO_TITLE);出错
- Android requestWindowFeature(Window.FEATURE_NO_TITLE)无效解决方法
- Android Studion的Monitor中显示No Debuggable Application的解决方法
- Android问题:设置了requestWindowfeature(window.feature_no_title)后,为什么还要getwindow.setFlags?
- Android 中无法取消标题栏的问题,requestWindowFeature(Window.FEATURE_NO_TITLE);无效
- android 隐藏标题栏 无效 requestWindowFeature(Window.FEATURE_NO_TITLE)
- 解决安卓manifest中的application标签中@android:style/Theme.NoTitleBar崩溃的问题
- Android application UI with no ActionBar or TitleBar
- android app图标总是显示默认的机器人图标,且在manifest文件的application中修改无效