Is it possible to specify android: screenOrientation for the whole application once in the manifest file and not to prescribe it for each activity, if so, how?

  • Activate only one, all the rest fragments. - Maxim Fomichev
  • @MaksimFomichev, fragments and activities are different things, there can be several activities and / or several fragments in android projects. At the moment I'm interested in exactly activity. - nikita

1 answer 1

All the same, you need to prepare at least a little bit. This is shown on all learning resources.

<activity android:name=".MainActivity" android:screenOrientation="portrait"> // вот это <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> 

Oh, sir. I did not immediately understand the question.