Mobile splash screen orientation


#1

Is there any way to add orientation to splash screen?
here I found one solution which says to add something to manifest file

<activity 
        android:name="org.apache.cordova.DroidGap" 
        android:label="@string/app_name" 
        android:configChanges="orientation|keyboardHidden"
        android:screenOrientation="landscape"           
        > 
        <intent-filter> 
        </intent-filter> 
    </activity>

How to create this activity in metor mobile?


#2

In your mobile-config.js you can can use App.setPreference to accomplish this.

App.setPreference("orientation", "portrait");

#3

As a point of clarity. This locks the orientation for the whole app, not just the launch screen. No way to configure it to only affect the launch.


#4

Thanks for the quick reply,

although I gave this permission in my mobil-config.js file my splash screen is still showing in landscape mode when my mobile is rotated.

Any other ways to do this?


#5

This has worked for several apps I have built. Not sure why it would not work for you.