How do I programmatically disable screen rotations for an entire Android application?
解决方案
As in keep it in portrait or Landscape no matter which way device is tilted?
You need to add this to your manifest inside the activity that you want to limit
android:screenOrientation="portrait" //Or landscape for horizontal.
If you want it different between activities just make your manifest look like this.
android:screenOrientation="landscape">
android:screenOrientation="portrait">
android:screenOrientation="landscape">