Questions tagged [portrait]

Portait, in a mobile device, is that orientation where the width is smaller than the height. As opposed to Landscape

Portait, in a mobile device, is that orientation where the width is smaller than the height. As opposed to Landscape

460 questions
331
votes
24 answers

Flutter: how to prevent device orientation changes and force portrait?

I would like to prevent my application from changing its orientation and force the layout to stick to "portrait". In the main.dart, I put: void main(){ SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, …
boeledi
  • 6,837
  • 10
  • 32
  • 42
324
votes
12 answers

Force "portrait" orientation mode

I'm trying to force the "portrait" mode for my application because my application is absolutely not designed for the "landscape" mode. After reading some forums, I added these lines in my manifest file:
thomaus
  • 6,170
  • 8
  • 45
  • 63
159
votes
11 answers

How do I specify different layouts for portrait and landscape orientations?

I've seen references to being able to specify two separate layout xml files for an activity, one for Portrait and one for Landscape. I've not been to find any information on how to do that though. How do I specify for each activity which xml file…
Jay Askren
  • 10,282
  • 14
  • 53
  • 75
143
votes
17 answers

How to lock orientation of one view controller to portrait mode only in Swift

Since my app got support for all orientation. I would like to lock only portrait mode to specific UIViewController. e.g. assume it was Tabbed Application and when SignIn View appear modally, I only want that SignIn View to the portrait mode only no…
Thiha Aung
  • 5,036
  • 8
  • 36
  • 79
126
votes
8 answers

Android - Camera preview is sideways

I am using a Preview to display what the camera see's on the screen. I can get everything working fine, surface created, surface set and the surface is displayed. However it always displays the picture at an incorrect 90 degree angle in portrait…
Donal Rafferty
  • 19,707
  • 39
  • 114
  • 191
109
votes
4 answers

Lock Android phone application to Portrait mode

Can someone tell me how to lock my application to a portrait mode? Is it a simple configuration in the manifest file?
sexitrainer
  • 1,347
  • 2
  • 12
  • 18
55
votes
9 answers

Find out if Android device is portrait or landscape for normal usage?

Is there anyway to find out if a device is portrait or landscape by default? In that I mean how you normally use the device. Most phones have a portrait screen for normal usage but is there some flag for finding that out?
joynes
  • 1,627
  • 4
  • 16
  • 19
30
votes
2 answers

Force portrait orientation while pushing from landscape View Controller

App Support: iOS6+ My app works in both portrait and landscape. But 1 controller should only works in a Portrait. The problem is that when I am in landscape and push the view controller the new viewcontroller is in landscape as well until I rotate…
Tariq
  • 9,861
  • 12
  • 62
  • 103
27
votes
8 answers

UISplitViewController: How force to show master popover in app launch? (portrait)

In an iPad App i'm using the UISplitViewController. I need to force to show the master popover when the app launch in portrait mode. Now I'm using this code and it works well on iOS 5.0. if…
alejandromp
  • 929
  • 1
  • 10
  • 19
23
votes
6 answers

SwiftUI Force Portrait On All Except One View

I have a SwiftUI project. For all but one of the views, I want to allow portrait and only portrait mode. For only one view, I want to allow both portrait and landscape. There are some resources on Swift but I couldn't find any on SwiftUI. Did anyone…
berkabbasoglu
  • 305
  • 1
  • 3
  • 7
21
votes
2 answers

css expanding based on portrait or landscape screen size?

I have two divs that are floating next to each other. What i would like is to have it have a width of 100px when you are looking at it in portrait mode and lets say 200 px in landscape. This happens viewing on a mobile device actually. So the…
Xtian
  • 3,535
  • 11
  • 55
  • 91
20
votes
3 answers

Camera : setDisplayOrientation function is not working for Samsung Galaxy ACE with Android 2.3.6

I was trying to create a simple camera application for research. I Read Android Camera Official Document and then started coding. so I did some steps to get it work 1.Added required permissions for Camera feature in app. 2.locked my activity to…
swiftBoy
  • 35,607
  • 26
  • 136
  • 135
18
votes
5 answers

Android zxing - portrait camera preview/surfaceview is stretched/warped

I have managed to use the answer here to rotate the camera preview to portrait: http://code.google.com/p/zxing/issues/detail?id=178#c46 however the preview itself is stretched/warped - the height appears to be stretching to fill the box (but it…
AndroidNoob
  • 2,771
  • 2
  • 40
  • 53
17
votes
4 answers

How do I lock screen orientation for phone, but not for tablet? (Android)

I have been working on a Android project, that is intended to be compatible with both the Android phones and tablets. On the tablet the app is working great and looks good too. However, on the phone we have been running into issues both…
Sjieke
  • 384
  • 1
  • 2
  • 9
17
votes
6 answers

UISplitViewController not showing popup button when launching portrait

I am doing an iPad app based on a UISplitViewController. I have a little problem with the toobar button when my app launched in potrait. The button to show the popover is not displayed. However when I rotate my iPad into landscape and then back to…
rpechayr
  • 1,282
  • 12
  • 27
1
2 3
30 31