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?
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);
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
I was required to display my website in a full page iframe, which was already a pain in the ass (I'm ranting sorry).
In the I have a select input and it seems that after I make a selection the screen freezes when the screen is vertical but if I put it in landscape mode it works like a charm.
Also the same thing happens when I go from landscape to vertical mode and again all comes back to normal back in landscape mode.
I though it could be due to some of my scripts but I remove everything and I still got the issue.
And I forgot to mention it, but there was no issue at all before installing ios 7.
I'm at it for a while so any suggestion would be really appreciated.
I tried reducing the code to the minimum cleaning out the unecessary stuff and putting everything together in a single file instead of using partial pages. Since then it seems to work so I'm gonna leave like that it's been long enough.
Still not sure what was the issue even though it worked on IOS 6 and without the iframe or in landscape mode on IOS 7. Anyway I'm done with it
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
I have a problem when I use launch images in an Air application. I don't know if this is the expected behaviour, but when the app starts, the launch image is first displayed as expected, however then it gets resized for a second.
I don't care too much about this, although since the iPhone images have to take into account the statusbar, the effect is a bit ugly in this case.
Can this be solved? is it a problem with Air? is it expected behaviour?
I noticed a similar problem with AIR 3.2 and a fullscreen, fixed-orientation (landscape) app in iOS - the splash image starts in landscape, then flips to the wrong orientation during loading. I suspect it's a bug but couldn't find a workaround.
Since I don't see any pressing reason to move to 3.2, I'm sticking with AIR 3.1 for the time being, which displays the splash image correctly.