how can I disable landscape mode javafx?

228 views Asked by At

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

2

There are 2 answers

0
José Pereda On

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>
0
Pushpendra On

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

 android:screenOrientation="portrait"