Questions tagged [screen-rotation]

Screen Orientations change in a sensor based (touch) phones, when you rotate. In other phones, developers want to rotate the content, on an event when users click on a button or an option that specifies this function, or as a default option when e.g. when you have written code for landscape orientation and running on device, which has portrait resolution.

Screen Orientations change in a sensor based (touch) phones, when you rotate. In other phones, developers want to rotate the content, on an event when users click on a button or an option that specifies this function, or as a default option when e.g. when you have written code for landscape orientation and running on device, which has portrait resolution.

496 questions
7
votes
3 answers

willRotateToInterfaceOrientation not being called from presented viewcontroller

I have uiviewcontroller on ipad with this configuration: shouldAutorotate (true) supportedInterfaceOrientations (UIInterfaceOrientationMaskAll) and inside willRotateToInterfaceOrientation i perform some trick to adjust my interface. From a child of…
7
votes
2 answers

iOS OpenGL ES screen rotation while background apps bar visible

My app uses GLKit to render 3D scene with OpenGL ES. All works fine, except one thing. When I launch my app in iPad and display background apps bar (with double "Home" button click) and then change device's orientation, scene is updated wrongly…
kpower
  • 3,871
  • 4
  • 42
  • 62
6
votes
2 answers

UICollectionView autosize and dynamic number of rows

I am trying to do something like this: Basically, I am using a UICollectionView and the cells (3 diferent .xib). So far, it works. The thing I want to do is: Set a autoheight If rotate, add 1 row to the UIColectionView 2.1 If tablet, on portrait…
Amg91
  • 165
  • 8
  • 25
6
votes
1 answer

Why does Parcelable work even though I did not implement the necessary functions?

I wanted to retain a complex java object during screen rotation, so I made the object Parcelable and implemented necessary methods: in writeToParcel(Parcel dest, int flags) method, I some saved values to "dest". in Parcelable.Creator's…
Nika Kurdadze
  • 2,502
  • 4
  • 18
  • 28
6
votes
4 answers

iOS 9 Orientation Auto-Rotation Animation Not Working, But Always on Main Thread

iOS 9.0 (13A340) Xcode 7.0 (7A220) OS X 10.10.5 (14F27) I have a situation where if I rotate the simulator or device (using iPhone 6s sim and iPhone 6+ device), the animation does not also take place. I am unsure of why this is happening. I am not…
Stefan Arambasich
  • 2,231
  • 2
  • 19
  • 24
6
votes
3 answers

Completion block isn't called when updating UIPageViewController during rotation

I'm trying to update the current page in UIPageViewController during rotation as following: - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { NSArray *controllers =…
Hejazi
  • 16,587
  • 9
  • 52
  • 67
6
votes
1 answer

Nested DialogFragment gets dismissed after rotation

I have a nested(!) Fragment that shows my PhotoNoteDialogFragment: private void newPhotoNote() { mPhotoDialog = PhotoNoteDialogFragment.newInstance(this); mPhotoDialog.show(getFragmentManager(), PhotoNoteDialogFragment.TAG); } The dialog pops…
muetzenflo
  • 5,653
  • 4
  • 41
  • 82
6
votes
2 answers

Rotation of UIPageViewController in Container View Controller

I have a UIViewController that contains other ViewControllers. Initial ViewController is set in viewDidLoad: FirstViewController *first = [FirstViewController alloc] init]; first.view.autoresizingMask = UIViewAutoresizingFlexibleWidth |…
DaNY
  • 191
  • 2
  • 6
5
votes
0 answers

Screen Orientation Rotation in swiftUI in iOS16

I am working on an app which uses viewcontrollers and I am slowly migrating to use views built using SwiftUI. I am working on new swiftUI views, so i am setting UIHostingController as the rootViewController in the SceneDelegate Overall my whole app…
NNN
  • 543
  • 5
  • 14
5
votes
3 answers

Prevent onFocus Listener being notified after configuration change?

I am attaching a focus listener to an EditText during on OnCreateView in my Fragment. If the EditText gets focus, the listener is notified. So far so good, but the listener is notified again after screen rotation, when the focus is restored on the…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
5
votes
1 answer

How long can I hold onto a ContentResolver in an AsyncTask?

I'm trying to write an Activity that spawns off an AsyncTask for a long-running operation, and periodically publishes status updates back to the Activity. I'd like to make sure the AsyncTask survives screen rotation or other destruction conditions…
user79758
5
votes
3 answers

How to restore textview scrolling position after screen rotation?

In my Android Layout, I have a TextView. This TextView is displaying a rather large spannable text and it is able to scroll. Now when the phone is rotated, the View is destroyed and created and I have to setText() the TextView again, resetting the…
Josh
  • 51
  • 1
  • 2
5
votes
1 answer

MPVolumeView route list is supporting all orientations and ignoring underlying view controller

This appears to be an OS bug, but a workaround is still needed. Targeting iOS 8 or 9, using view controller based orientation, MPVolumeView's route list will always rotate, even if its parent view controller only supports a single orientation. This…
Ric Santos
  • 15,419
  • 6
  • 50
  • 75
5
votes
1 answer

iOS How to replicate Youtube App player rotation?

Any idea about how the feature I show in this video is done? It looks like the touch on the "expand" button force an orientation change for the device (infact when I swipe I'm pulling the control centre out). Anyway only the video player seems to…
luca
  • 36,606
  • 27
  • 86
  • 125
5
votes
3 answers

shouldAutorotate not called on view controller

I have a simple app consisting of a single view controller. I started with the Xcode 7 GM Single View Application template, but then deleted the main storyboard, and set up my view controller like this: func application(application: UIApplication,…
Zev Eisenberg
  • 8,080
  • 5
  • 38
  • 82
1 2
3
33 34