1.在AndroidManifest.xml中设置activity属性:

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

其中landscape为横屏,portrait为竖屏。

2.在代码中设置:

requestWindowFeature(Window.FEATURE_NO_TITLE);

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

 

来源:http://yuanliyin.iteye.com/blog/888396

发表评论