Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Set activity screen orientation using styles

$
0
0

I'm trying to set activity screen orientation using a styles:

Here is the styles.xml:

...<style name="Some.Activity" parent="android:Theme"><item name="android:screenOrientation">portrait</item></style>...

and here is activity declaration in AndroidManifest.xml:

<activity android:name="SomeActivity" android:theme="@style/Some.Activity"/>

and it doesn't work.
I know that I can just set

<activity android:name="SomeActivity" android:theme="@style/Some.Activity"    android:screenOrientation="..."/>

in the manifest, but its important to me to do that using a theme.
Ideas?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>