try to modify the styles.xml like below <resources> <style name="Landscape"> <item name="android:screenOrientation">landscape</item> </style> </resources>
On Sat, Jan 14, 2012 at 12:21 AM, Chuck Kasek <cka...@gmail.com> wrote: > Can anyone tell me if there is something specific you have to do to > use the screenOrientation attribute in a style? If i put it directly > on the activity tag in my manifest, it works fine, but if I try to use > it as part of a style it doesn't work. > > This works: > <activity android:name=".MyActivity" android:label="@string/app_name" > android:screenOrientation="landscape"> > > This does not work > <activity android:name=".MyActivity" android:label="@string/app_name" > android:theme="@style/Landscape"> > > in styles.xml: > <style name="Landscape"> > <item name="android:screenOrientation">landscape</item> > </style> > > Thanks > Chuck > > -- > 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 -- 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