-1

I want to disable landscape modeon javafx app for the whole app. How can I do that? I'm also using Gluon plugin.

Thanks in advance

Denise
  • 131
  • 10

2 Answers2

1

On Android by default you have enabled changes between portrait and landscape orientations.

If you want just portrait orientation, you can set this on the AndroidManifest.xml file under src/android/:

<activity android:name="javafxports.android.FXActivity" 
                      android:label="<yourAppName>" 
                      android:screenOrientation="portrait"
                      android:configChanges="orientation|screenSize">
    ...
</activity>
José Pereda
  • 44,311
  • 7
  • 104
  • 132
0

Add this line to your AndroidManifest.xml under the activity tag:

 android:screenOrientation="portrait"
Pushpendra
  • 2,791
  • 4
  • 26
  • 49