I have an application that I just would like to use in portrait mode, so I have defined android:screenOrientation=\"portrait\" in the manifest XML. This works OK for the HTC
In OnCreate method of your activity use this code:
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
Now your orientation will be set to portrait and will never change.