我将尝试使用样式设置活动屏幕方向:
这是 styles.xml 文件内容:
...
<style name="Some.Activity" parent="android:Theme">
<item name="android:screenOrientation">portrait</item>
</style>
...
这里是在AndroidManifest.xml中声明活动的代码:
<activity android:name="SomeActivity" android:theme="@style/Some.Activity"/>
并且它不能正常工作。
我知道我只需要设置标签来结束这个段落。
<activity android:name="SomeActivity" android:theme="@style/Some.Activity"
android:screenOrientation="..."/>
在清单中也可以实现,但对我来说使用主题更重要。
有什么想法吗?