LoginSignup
33

More than 1 year has passed since last update.

posted at

updated at

Androidの表示画面の回転固定

#横方向に固定する場合
androidManifest.xml内の対象となるactivityタグの中に、android:screenOrientation="landscape"を挿入する。

例えば、

androidManifest.xml
<activity
	android:name=".MainActivity"
	android:screenOrientation="landscape">
</activity>

#縦方向に固定する場合
<activity android:screenOrientation="portrait">を挿入する。

例えば、

androidManifest.xml
<activity
	android:name=".MainActivity"
	android:screenOrientation="portrait">
</activity>

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
33