You might want to do this during onCreate setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
or landscape whichever it is that you want On Sat, Oct 24, 2009 at 2:22 AM, Philip <phwang...@gmail.com> 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? > > > > -- Writing code is one of few things that teaches me I don't know everything. http://www.fuligin.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---