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).
If you use portrait
for screen orientation in manifest, the tablet screen wont rotate to landscape.