Hi,
I'm trying to lock my activity to the current orientation to prevent
an orientation change from restarting my activity while I'm waiting
for a http response.
So I'm trying to use this:
setRequestedOrientation(getResources().getConfiguration().orientation);
And it works fine for portrait
Assuming you lock the orientation, how will you prevent the user from
sliding out the keyboard on those devices that have it? (For the duration of
your HTTP request.)
Less plausible, but possible as well, from changing the phone's configured
UI language?
--
Kostya Vasilyev
17.07.2011 2:41
If you add android:configChanges=orientation to your activity in the
manifest then the method onConfigurationChanged of your activity will be
called, here you can decide what to do with the change, but most important,
the activity will not be restarted.
You can check this
Those are two different orientations.
The Configuration constants:
http://developer.android.com/reference/android/content/res/Configuration.html#ORIENTATION_LANDSCAPE
The constants for set/getRequestedOrientation():
4 matches
Mail list logo