My application supports Portrait Mode in some pages and Landscape Mode in others, so in the case of the IOS version of the application I have Portrait, Landscape Left and Landscape Right turned on but restricted in the View Controllers. I have noticed however that during startup of the application when the Splash Screen is displayed it allows rotation. Wondering if the only way around this is to include additional assets for the Landscape version of the Splash Screen image.
Using Worklight 6.2 and Cordova 3.4.1
I did not notice the application rotating while the splash screen is displayed, ... but anyway, you can solve this in 2 ways:
As your wrote - provide "proper" splash images, but I think that would still be odd looking. Or
Create a custom splash screen behavior; basically implement the Objective-C code that will disallow the rotation during the initialization stage of the application.
For this, you can read the following documents:
Common UI controls training module, starting slide #29
Managing the splash screen user documentation topic
Related
I had locked my react application to landscape by adding the following code to Application tag(in Manifest) and inside every activities tag
android:screenOrientation="landscape"
android:configChanges="keyboard|keyboardHidden|screenSize
It was working fine, until i added the modules for file reading react-native-fs
Now when the app starts the screen is rotated to landscape, but if the user rotates the phone to portrait, the screen also rotates to portrait (it should remain in landscape instead).
Things i tried
Added android:screenOrientation="landscape" in the manifest of modules.
In MainApplication registered registerActivityLifecycleCallbacks and added activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); in onActivityCreated.
Still it's not locked to landscape.
The app should be locked to landscape even if rotated to portrait.
I'm not completely sure, but I think you need to use android:configChanges="keyboardHidden|orientation|screenSize"
I figured out the problem. The React-Native-Navigation library was causing the issue.
It had a class ActivityCallBacks inside Controller package . Adding the following code inside onActivityCreated() resolved the issue :
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
I am working on a iOS project with Cordova. The Project is in Landscape only.
If I copy a Default.png in the Project folder, it is displayed correctly in the launcher image but in the Cordova splash screen it is rotated by 90°.
If I rotate the Default.png the launcher image is oddly stretched and the Cordova splash screen is is shown perfectly.
The Landscape/Portrait tag doesn't work because Cordova just uses the Landscape-image.
Is there a way to use different images for the launcher and the splash screen?
You need to set all the splahs screens in the Resources folder. Then in iOS you can also set what orientations you want your application work in. If you be specific with your splash screens then it can only show what you put in there.
Short answer - I beileve the launch image an splash screen are one in teh same.
This question looks similar - Orienting iOS splash image to landscape/portrait according to launch orientation
So, I had a phonegap app that worked fine on iOS 5, but when iOS 6 debuted the only issue introduced into the application is that now on the iPad, only, when I run my application in Landscape orientation, the splash screen will now load up and show correctly, then the app flashes and the splash screen rotates 90 degrees clockwise, and apparently moves 20-30 px, roughly, to the left.
It appears that it's trying to use a Portrait oriented splash screen, instead of the landscape one, but all the files are the correct ones, so I've run out of ideas on where to look.
Any and all help would be greatly appreciated, as this last little thing is the only thing preventing me pushing my update.
see here
or update to phonegap 2.1
Nowadays, I am working on a iOS project formed with Phonegap 2.0 and jQuery Mobile 1.1.1 and I am having a serious issue with orientation changes.
The problem is the screen size proportions after the orientation changes that you make during loading.
After loading completes orientation works without any problem if I didn't change the orientation during loading.
If I change the orientation during the launch/loading of the application than it starts acting weird! like giving white spaces near the screen etc. Orientation is completely start acting weird from that point which pushes me to restart the app.
Did some one face the same problem?
Is it possible to replace the splash screen for iOS and Android with a custom one?
As far as I know there are 2 splash screens in iOS PhoneGap:
The "normal" iOS splash screen
The PhoneGap splash screen (same image with a spinner)
Would it be possible to:
replace the "normal" iOS splash on runtime as it is possible with normal xCode Projects
replace the "spinner" splash screen (I couldn´t figure out if that´s the phonegap-plugins / iPhone / SplashScreen code or not)
It seems that the normal xCode ways of doing things get overwritten. I´m a bit confused by that as I´m new to PhoneGap.
yeah,you can do that.
make your custom image in 640×960px(name:Default#2x~iphone.png) and 320×480px(name:Default~iphone.png)
go to[Name Your Project]/Resources/splash
replace them..