0

i have used this code but it is not working for me setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); but the output shown like this Here is the output in emulator

I want it to fit on the screen like landscape but the content show in portrait mode.

Syed Hasan
  • 161
  • 1
  • 5

1 Answers1

1

You have to make two type of designs one for portrait mode and another for landscape mode.

res/layout [Portrait Mode; default]
 main.xml
res/layout-land [Landscape Mode]
 main.xml 

Please check the following answer. Link: Different design for landscape and portrait orientation android