Android Application - No window title, Full screen, Landscape (横向显示)

1. 横向显示

 

android:screenOrientation="landscape" in AndroidManifest.xml

 

2. Set "No-Title": To add winStyle.xml in res/values

 

(代码编辑器有问题,改成图片插入)

 

Android Application - No window title, Full screen, Landscape (横向显示)_第1张图片

 

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 Application - No window title, Full screen, Landscape (横向显示)_第2张图片

你可能感兴趣的:(java,android,File,application,action,encoding)