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
14
votes
3 answers

hidden backstack fragments re-shown on configuration change

I am building a one activity-multiple fragments application. I add to the backstack after every transaction. After a couple of hiding and showing fragments and then I rotate the phone, all the fragments added on the container were restored and…
yojoannn
  • 626
  • 1
  • 9
  • 26
12
votes
3 answers

why using android:configChanges is a bad practice

I have gone through different posts and questions for handling rotation and AsyncTask. In each post it is mentioned that using android:configChanges is a bad practice. But i didn't find the actual reason why it is discouraged and why it is a bad…
SAIR
  • 1,121
  • 11
  • 31
12
votes
2 answers

Where to change "installed" for Auto Layout constraint?

When using Auto Layout in a storyboard there's an option to keep a constraint installed or not with an "Installed" checkbox. Disabling it will cause it to behave as if you didn't add that constraint - it will have no effect. You can configure the…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
12
votes
4 answers

Setting text on multiple inflated EditTexts causes all to be populated with same text after rotation

I am inflating a few EditTexts and adding them to a LinearLayout: private void setupCommentViews(){ int i = 0; Iterator iterator = commentInformations.iterator(); while(iterator.hasNext()) { i++; …
11
votes
4 answers

Android fragments overlapping after screen rotation

This app is a learning exercise for me using fragments, among other things. It has a single activity that manages some different fragments. The first is a ListFragment (A), which shows when the app starts and loads list items from a cursor. Clicking…
Karakuri
  • 38,365
  • 12
  • 84
  • 104
10
votes
1 answer

How to disable the device rotation animation in SwiftUI?

For UIKit to disable the device rotation animation you could override the viewWillTransitionToSize method. Disable orientation change rotation animation But what would be the best way to achieve this in SwiftUI?
adelmachris
  • 332
  • 2
  • 13
10
votes
2 answers

Avoid Android VideoView corruption when rotating back to portrait

I've managed to write a limited video player able to view a .3gp file from internet. The video will be shown centered full screen, maintaining the video aspect ratio. Also, rotations don't interrupt the video, which keeps playing without…
10
votes
3 answers

How can I globally detect when the screen rotation changes?

Question In an Android service, I want to detect whenever the screen rotation changes. By rotation, I don't just mean portrait versus landscape; I mean any change to the screen rotation. Examples of such changes are changes to: Portrait Reverse…
Sam
  • 40,644
  • 36
  • 176
  • 219
8
votes
1 answer

Android Studio API Level 28: Rotating emulator does not rotate the app contents or device UI

Foreword. I know this question has been asked several times in the past, but none of the solutions have actually worked for me. It's also been several years since a similar question has been asked (according to a time-filtered Google search), so…
8
votes
1 answer

Android: Auto Rotate not working after setRequestedOrientation

I have a video player in which I have two features: If the auto-rotate is disabled and when the user clicks on fullscreen button I force the orientation to go in landscape view using…
8
votes
2 answers

Animate changes during device rotation based on size element will be after rotation completes

I have a dynamic setup of buttons that automatically adjust in width and height based on auto layout constraints set up in a storyboard. When in portrait the buttons have equal widths and heights so the frame is perfectly square, and when the device…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
8
votes
1 answer

App won't respond until rotation/2x occurs on iPad3

I am wondering if anyone else has had this happen to them. I have a iPhone App that I have been updating for over a year and it has been working just fine on my iPad2, iPhone 3GS, as well as the 4G, 4GS, and 5. However, just recently I obtained an…
Kivak Wolf
  • 830
  • 8
  • 29
7
votes
1 answer

Open OptionsMenu of Activity leaks window on device rotation

Trying to understand what cause the window leak in my Activity. The activity extends AppCompatActivity. It has a single view with a RecyclerView and a ProgressBar invisible while rotating. @Override protected void onCreate(@Nullable Bundle…
7
votes
6 answers

Hiding UISplitViewController overlay in portrait

In adopting the new UISplitViewController I'm trying to make a change a default behaviour that occurs when using the UISplitViewControllerDisplayModeAutomatic mode. When working in portrait I want the primary overlay to hide when the user triggers a…
Parrots
  • 26,658
  • 14
  • 59
  • 78
7
votes
4 answers

Android - don't refresh Google Maps v2 on rotation

When I rotate my device, Google Maps v2 refreshes. How do I prevent this refresh from occurring? I'm adding the map dynamically in a tab of a SherlockFragment.
Anonymous1
  • 3,877
  • 3
  • 28
  • 42
1
2
3
33 34