Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to close landscape mode just for normal layout?

Tags:

java

android

I have an app which needs to close landscape mode just for normal layout and large layout has both landscape and portrait. how do I do that?

like image 859
Mehrad Farahnak Avatar asked Nov 08 '22 11:11

Mehrad Farahnak


1 Answers

to disable landscape mode for an activity you can declare this line in manifest

<activity android:name=".YourActivity"
android:label="@string/name"
android:screenOrientation="portrait" />
like image 126
jitendra purohit Avatar answered Nov 14 '22 23:11

jitendra purohit