Android程序设置成横屏方法 博客分类: android AndroidXML
程序员文章站
2024-02-21 17:59:22
...
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);