Android程序设置成横屏方法

1.AndroidManifest.xml设置属性:

android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden"

 

2.代码中设置:

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);

你可能感兴趣的:(xml,android)