31
Help us understand the problem. What are the problem?

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>
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
31
Help us understand the problem. What are the problem?