Questions tagged [landscape-portrait]

The concept of a mobile device being able to be viewed both in landscape mode and in portrait mode.

The concept of a mobile device being able to be viewed both in landscape (wide) mode and in portrait (narrow) mode.

Use this tag for issues regarding the modes and switching aforementioned modes, for example if your application inhibits the transition.

597 questions
107
votes
5 answers

What is the "right" way to handle orientation changes in iOS 8?

Can someone please tell me the "right" or "best" approach to working with portrait and landscape interface orientations in iOS 8? It seems that all the functions I want to use for that purpose are deprecated in iOS 8, and my research has turned up…
rmp251
  • 5,018
  • 4
  • 34
  • 46
47
votes
8 answers

iOS: Image get rotated 90 degree after saved as PNG representation data

I have researched enough to get this working but not able to fix it. After taking picture from camera as long as I have image stored as UIImage, it's fine but as soon as I stored this image as PNG representation, its get rotated 90 degree. Following…
Paresh Masani
  • 7,474
  • 12
  • 73
  • 139
42
votes
9 answers

Zxing Camera in Portrait mode on Android

I want to show portrait orientation on Zxing's camera. How can this be done?
Roy Lee
  • 10,572
  • 13
  • 60
  • 84
26
votes
3 answers

Child View Controller to Rotate While Parent View Controller Does Not

What I am Trying to Do: Parent View that is managed by Parent View Controller SHOULD NOT ROTATE. Child View that is managed by Child View Controller SHOULD ROTATE to all orientations. What I Have Tried: ParentViewController override func…
25
votes
4 answers

Creating different layout for android phone and tablet

This is a basic android question. I have app which need to have different screen design for a phone and a tablet. The phone needs to have a ListView and the Tablet need to have a GridView of items. I wish to know how can I do this without making…
user3713706
  • 1,243
  • 4
  • 15
  • 18
25
votes
3 answers

Autorotate a single UIViewController in iOS 6 with UITabBar

I have an app that work only in Portrait Mode, but there is a singleView that can display video, so i want that view work also in the landscape mode, but in iOS 6 I can't figure out how I can do it, now I have this: In AppDelegate.m i…
Piero
  • 9,173
  • 18
  • 90
  • 160
23
votes
4 answers

How to prevent a Phonegap application to switch to landscape view

This one should be very simple, however it's not. I'm trying to prevent my application from going into landscape view so I've changed the config.xml file like this: . Unfortunately, it's not working.…
DMEM
  • 1,573
  • 8
  • 25
  • 43
22
votes
4 answers

ExoPlayer resume on same position on rotate screen

I am using ExoPlayer in my activity,What i want is to smoothly play video in portrait and landscape mode.For this purpose what I am doing is in onpause I save the currentPlayerPosition and seek player to that position in onresume but while rotating…
Ali Akram
  • 4,803
  • 3
  • 29
  • 38
21
votes
3 answers

UIDeviceOrientationFaceUp - how to distinguish between portrait and landscape?

I'm trying to find out if the device is in portrait or landscape mode. My code works quite well if the device is not facing up. If it does face up (and orientation == 5), it won't distinguish between portrait and landscape. Is there anyway to…
n.evermind
  • 11,944
  • 19
  • 78
  • 122
20
votes
6 answers

Android - switching between landscape and portrait mode makes Intent lose values

I am using Intents to switch between activities in my Android app. I am putting data in the Intent for use in the next activity. When I switch the phone between landscape and portrait modes, the values passed from the intent are lost and I get a…
lostInTransit
  • 70,519
  • 61
  • 198
  • 274
17
votes
4 answers

Android - How to use camera getSupportedPreviewSizes() for portrait orientation

I'm trying to embed a camera preview in an activity. And it's only in portrait orientation. The problem is the preview gets stretched. I've tried to pick the optimal size. But the problem is all supported preview sizes from…
Rafael Adel
  • 7,673
  • 25
  • 77
  • 118
13
votes
5 answers

Resize a view when a keyboard appears (iOS)

I realize there are many similar solutions, such as TPKeyboardAvoiding, Apple's famous solution, and various suggestions involving the use of UIScrollView. In my case, I need to resize a view to accommodate the keyboard rather than scroll or move…
bkocik
  • 414
  • 2
  • 5
  • 14
12
votes
1 answer

Safe Area changes in parent VC when presenting modally VC in landscape

Safe Area Insets in first UIViewController changes to Safe Area Inset for landscape when I present SecondViewController, which supports only landscape orientation. GIF with described bug GIF with described bug that touches TabBar and…
12
votes
2 answers

How to set page orientation for Word document?

I use Apache POI XWPF to create and handle MS Word documents. But I didn't find in the documentation how to change the page orientation. Apparently this way should make it: XWPFDocument doc = new XWPFDocument(); CTDocument1 document =…
kapandron
  • 3,546
  • 2
  • 25
  • 38
10
votes
3 answers

Combine layout_weight and maxWidth for views

I'm trying to make my layouts more landscape friendly, and a common pattern I have is to add a LinearLayout with some buttons (e.g. OK | Cancel) and just set a value for layout_weight so that the space is evenly distributed. The problem is that when…
dmon
  • 30,048
  • 8
  • 87
  • 96
1
2 3
39 40