Sunday, December 15, 2019

how i can use landscape in Navigation Component in Android Studio?

Add android:screenOrientation="landspace" to the activity in the AndroidManifest.xml.
For example:
<activity android:name=".SomeActivity"
          android:label="@string/app_name"
          android:screenOrientation="landspace" />
in java:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSPACE);