📜  如何在 android studio 中设置风景 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:10.858000             🧑  作者: Mango

代码示例1
in the manifest, set as attribute of the node activity the code below:
android:screenOrientation="landscape"

Also, in you MainActivity Class, inside the onCreate method, after the super call type:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);