Can i specially forbids switching orientation when rotating phone on my app?

by Philip » Sat, 24 Oct 2009 17:23:01 GMT


Sponsored Links
 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?

--~--~---------~--~----~------------~-------~--~----~