i have used this code but it is not working for me setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
but the output shown like this
I want it to fit on the screen like landscape but the content show in portrait mode.
i have used this code but it is not working for me setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
but the output shown like this
I want it to fit on the screen like landscape but the content show in portrait mode.
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