Alternative resources for landscape and portrait orientation - orientation

I have two activities and the layout of these activities have background images that are different for portrait and landscape . i have make different folders named drawable-land-hdpi and drawabe-port-hdpi and put the images in these. But when i start application it loads the right image according to orientation of device , but after that when i am changing the orientation , it is not loading the image from portrait when i change orientation to portrait and also is not loading image from landscape when i change orientation to landscape.
Does any on e know the reason ? Please help .
Any kind of help and suggestions will be appreciated.
Thanks,
Munazza

Related

How to make launchscreen.storyboard support portrait and landscape

I use LaunchScreen.storyboard as my launch image. It works ok when the devices are portrait. When i launch the app on landscape mode on ipad or iphone7 plus whe image was stretched.How can i use two different image for portrait and landscape mode.
Thank you.
You can set another image based on the size class traits. Unfortunately this does not help with left and right landscape rotation (you can only have an image for one of them). Also it is kind of base on the fact that for current iPhones landscape can be detected by having a compact height trait. This may change in future.

Manage orientation landscape and portrait both in a app iPhone

According to my client's requirement I want to set Splash Screen orientation in landscape(right) then the orientation will come in portrait.. any idea how can I implement it?
Just rotate your splash image in an external editor so that is gets displayed in a landscape mode.
Just because you perceive it as landscape doesn't mean it's actually not "rotated portrait".
See your Splash Image will look like this:
Just rotate your image the way you want it to look like...
The iPhone only has a single splash screen, no matter which orientation it launches in. The iPad on the other hand will display a different splash screen image in portrait and in landscape mode.
If your iPhone interface supports both portrait and landscape then you must decide which way round you'd like to display that splash screen image. As Kanan says, design your landscape image (say in Photoshop), then rotate the canvas so that the image is portrait (but the content is still landscape).

Do you need a landscape iPad launch image for app thats just portrait

I have made me app so that device orientation is portrait only, however there it still has a place to put landscape launch image. Will I have to have one? If so can I just have a rotated version of the portrait one (i.e. this will be sideways if the device is held in a landscape manner)?
You don't need to have a landscape default image even if you do support landscape.
If you are only in portrait, then a single image will do.

IPad orientation support like home screen application icons

How to make a view with 3x4 thumb ImageViews in portrait mode and 4x3 thumb ImageViews in landscape orientation exactly that looks like
The orientation effect in iPad home screen icons change/animation effect from landscape to portrait vice verse..I have gone through the app (https://github.com/jarada/myLauncher) but it has the effect that it looks like going to set the frames every time device rotates.
Guide me how to design it a sample tutorial link
You can use UICollectionViewController, adjust its layout to return the desired sizes & locations for your icons.
This tutorial can help you create a custom UICollectioViewLayout.
Hope it helps.

IPad application first comes in portrait mode and then in landscape mode after unlocking the screen which was in landscape mode at the time of locking

Might be possible duplicate of :- iPad Application Comes Up in Portrait Orientation After Screen Unlock Regardless of Orientation on Screen Sleep but it does not provide any solution.
My problem is I am working in landscape mode on iPad and I locks my screen. After that when I unlocks, my screen first switch to portrait mode and then to landscape mode.
I don't know why it first switch to portrait mode.
Please if any one has face this problem before or know how to sort out this, help me .
Thanks in advance.
Any suggestions will be highly appreciated.
In your Info.plist file, make sure that UISupportedInterfaceOrientations~ipad (or UISupportedInterfaceOrientations) exists and has the portrait and landscape orientations your app supports are listed.

Resources