Android隐藏标题栏 状态栏 横屏

package com.lxt008;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class Activity01 extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        
        /* 设置为无标题栏 */
        requestWindowFeature(Window.FEATURE_NO_TITLE); 
        
        /* 设置为全屏模式 */ 
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); 
        
        /* 设置为横屏 */
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); 

        setContentView(R.layout.main);
    }
}

 

posted @ 2014-12-25 09:28  小菜希  阅读(263)  评论(0编辑  收藏  举报