小编Syn*_*poe的帖子

如何将应用设置为仅限肖像?

我唯一能找到的就是使用它:

android:configChanges="orientation"
    android:screenOrientation="portrait"
Run Code Online (Sandbox Code Playgroud)

但它保持正常.我的清单:

?xml version="1.0" encoding="utf-8"?>
Run Code Online (Sandbox Code Playgroud)

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:configChanges="orientation"
    android:screenOrientation="portrait"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
Run Code Online (Sandbox Code Playgroud)

android landscape portrait

12
推荐指数
1
解决办法
2万
查看次数

标签 统计

android ×1

landscape ×1

portrait ×1