Saturday, October 24, 2009

[android-developers] Re: Can i specially forbids switching orientation when rotating phone on my app?

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 <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?
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments:

Post a Comment