0

I am developing an application in which I want users to use the app in portrait mode only even if it is turned to landscape orientation in tablet. i.e., I want to rotate the tablet to landscape mode and app should be displayed in portrait not utilizing the entire screen width like in YouTube Studio app.

Attaching a sample screenshot below. In it is clear that the app is working in portrait mode only but the tablet orientation is in landscape and is not utilizing the entire screen width. You can see the app is centered and background wallpaper on both sides of the app (unutilized space of screen).

enter image description here

If you use portrait for screen orientation in manifest, the tablet screen wont rotate to landscape.

Rishin Ali
  • 149
  • 13
  • Does this answer your question? [Layout for tablets in Android](https://stackoverflow.com/questions/4185507/layout-for-tablets-in-android) – Ivo Dec 02 '21 at 09:32
  • @IvoBeckers This is not I'm looking for. For YouTube studio app it is not a different layout for landscape mode. The entire app UI is centered while using in landscape mode as you can see in the above screenshot. – Rishin Ali Dec 02 '21 at 10:02
  • [android-application-to-be-only-run-in-portrait-mode](https://stackoverflow.com/questions/3723823/i-want-my-android-application-to-be-only-run-in-portrait-mode) - is this what you are looking for? – Nitish Dec 02 '21 at 10:11
  • @Nitish No, if you use ```portrait``` the tablet screen is not rotating to landscape. What I want to achieve is the tab screen should rotate to landscape, but not the app. App will be displayed in portrait, centered, leaving unused screen space on both sides, just like the screenshot. YouTube is doing it, just not able to figure out how! – Rishin Ali Dec 02 '21 at 10:18

0 Answers0