2

I have seen many answers to this question showing something like this:

<activity android:name="..."
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">

</activity>

But i wonder if there is a way i do not have to repeat

android:screenOrientation="landscape"

in every activity.

Is there a way to set this global?

Mr. Caspar
  • 29
  • 5
  • 2
    I've always use android:screenOrientation="landscape", haven't seen other way to achieve that. – MarcinR Jul 11 '18 at 13:42
  • 1
    Yes, see Graham Borland's answer here: https://stackoverflow.com/a/24827944/6853453 – Breiby Jul 11 '18 at 13:49
  • You can do like this . Let all Activity inherit from a `BaseActivity` and then write in `BaseActivity` `onCreate ()` method. `setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);` – KeLiuyue Jul 11 '18 at 13:53

0 Answers0