문제

I've declared inside manifest of my project, for each activity

android:screenOrientation="portrait"

but when i launch my app, if i turn device in landscape, also orientation of my app change. How can i fix it?

도움이 되었습니까?

해결책

Another easy way to achieve that the Activities don't change orientation is to call

    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

in the onCreate() method of all activities that should not change their orientation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top