The <activity> element in your AndroidManifest.xml supports the android:screenOrientation property see:
http://developer.android.com/guide/topics/manifest/activity-element.html -- RichardC On Oct 24, 10:22 am, Philip <[email protected]> wrote: > When i chick a button on my app , the method below will be happened. > **************************************************** > if(android.provider.Settings.System.getInt(getContentResolver > (),Settings.System.ACCELEROMETER_ROTATION, 0) == 1) { > android.provider.Settings.System.putInt(getContentResolver > (),Settings.System.ACCELEROMETER_ROTATION, 0);} > > **************************************************** > Here i want to forbids switching orientation when rotating phone. > Also i hope the screen orientation will not be changed. > But when here is horizontal screen mode, the screen orientation will > be changed to vertical mode automatically . > That's not what i want. > Any suggestions? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

