Thanks - that worked!

On Jul 22, 3:36 pm, nadam <[email protected]> wrote:
> I don't think there is any way to do that in the manifest. However,
> you can remove android:screenOrientationfrom the manifest and set it
> in the activity's onCreate() method instead:
>
> if (Build.VERSION.SDK_INT < Build.VERSION_CODES.GINGERBREAD)
>
> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
> else
>
> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
>
> On 20 Juli, 20:43,thedude<[email protected]> wrote:
>
>
>
>
>
>
>
> > Is there a way to have different valued attributes in the manifest,
> > depending on platform version?
>
> > For example, for 2.3 and above, I would like to specify:
> > android:screenOrientation="sensorLandscape"
>
> > For 2.2 and below, I would like to specify
> > android:screenOrientation="landscape"
>
> > I want to use a 2.3 build target, but for the application be able to
> > run (and be locked to landscape) on 2.2 and below.
>
> > Thanks!

-- 
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

Reply via email to