admin管理员组

文章数量:1301533

I am developing an application for Meta Quest 2 and facing an issue with activity layout resizing. When transitioning from LandingActivity to AdminSettingActivity, the expected layout size does not change according to the specified android:defaultWidth and android:defaultHeight values in the manifest.

Despite setting android:resizeableActivity="true" and using the necessary meta-data for free resizing, the layout remains fixed. Could you please provide guidance on resolving this issue?

<application
    android:name=".app.MyApplication"
    android:allowBackup="true"
    android:usesCleartextTraffic="true"
    android:dataExtractionRules="@xml/data_extraction_rules"
    android:fullBackupContent="@xml/backup_rules"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/Theme.TrexyVR"
    tools:targetApi="31">

    <activity
        android:name=".ui.screens.AdminSettingActivity"
        android:exported="false"
        android:resizeableActivity="true"
        android:theme="@style/Theme.TrexyVR" >
        <layout
            android:defaultWidth="440dp"
            android:defaultHeight="1024dp" />
    </activity>

    <meta-data
        android:name="com.oculus.vrshell.supports_free_resizing"
        android:value="true" />

    <activity
        android:name=".ui.screens.LandingActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:resizeableActivity="true"
        android:exported="true"
        android:launchMode="singleTask"
        android:theme="@style/Theme.TrexyVR">
        
        <layout
            android:defaultWidth="1440dp"
            android:defaultHeight="1024dp" />

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.INFO" />
        </intent-filter>
    </activity>

    <receiver
        android:name=".utils.HeadsetPowerReceiver"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.SCREEN_ON" />
        </intent-filter>
    </receiver>

    <receiver
        android:name=".utils.HeadsetWearReceiver"
        android:exported="true">
        <intent-filter>
            <action android:name="com.oculus.intent.category.INFO" />
        </intent-filter>
    </receiver>

</application>

Reference:

本文标签: