How to disable resizeableActivity without disabling the support of foldable devices

Viewed 653

In the android developers site they say:

If you set resizeableActivity=false to disable multi-window mode but still want to support app continuity, add the following meta-data to the manifest of your element:

<meta-data
    android:name="android.supports_size_changes" android:value="true" />

If the value is true and the user attempts to fold or unfold a device, the activity will apply any changed configurations in a way that supports changes in window sizes.

So I did as they said but the activity isn't automatically resumed when I test it in the emulator. here is my code:

    <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:resizeableActivity="false"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:theme="@style/MaterialTheme">
    
            <meta-data
                android:name="android.supports_size_changes" android:value="true" />
     </application>

Did I do anything wrong?

0 Answers
Related