Splash screen's orientation for android device

is there a way to lock only the splash screen’s orientation to portrait without locking the whole application

Simply rotate your portrait splashscreen 90 degrees and put it into your “platforms/android/res/drawable-land-?” directories.

Portrait splashscreen:
image

Landscape splashscreen:
image

@mhartington pls help us

thanks @ramon , but it’s working only if loading time open app in landscape only if open app in portrait mode then swich to landcape mode the splascreen also moved to landscape how can i solve this issue ,pls help us

I never try it but, what happens if you delete all images inside “platforms/andorid/res/drawable-land-?” folders?

@ramon, deleted all images inside "platforms/andorid/res/drawable-land and tested app working as usual( first case) no effect.
any alternative sol is der?

I’ll try to find a solution later. Give me one day pls.

@ramon & @mhartington my exact problem is " we have already implemented splash screens for both portrait and landscape views It works perfectly only when we start in the respective orientations , for e.g. if we keep the device in landscape and start the app the splash screen designed for “landscape view” appears But the problem is when we open the app in portrait and once the splash screen for portrait appears when we try to change the orientation once the splash screen is displayed it appears to be squeezed instead of changing the splash screen with the orientation change, it squeezed the same image and displays…"

'<'preference name=“SplashScreen” value=“screen” />
"<“preference name=“orientation” value=“portrait” />
” <'preference name=“SplashScreenDelay” value=“10000” />

app.js:
app.run(function($ionicPlatform, Sms, $window, $state) {

$ionicPlatform.ready(function() {
if(window.navigator && window.navigator.splashscreen) {
    window.navigator.splashscreen.hide();
       window.plugins.orientationLock.unlock(); 
   }



});

1 Like

ok @nchirra. Thanks for sharing solution! :wink:

Hey sorry for missing this, (EST time, was sleeping when this was going on :smile:)

Great solution @nchirra, simple and clean!

Cheers