How to enable "resizeableActivity" for only a singe Activity

125 Views Asked by At

I am using samsung's foldable device - Galaxy Z Fold3 5G

I need to set resizeableActivity = true of only a single activity.

I cannot set it in main <application> tag as it will be applied to the whole app.

<application
     android:networkSecurityConfig="@xml/network_configuration"
     android:resizeableActivity="false"
     tools:targetApi="n">
.....
.....

</application>

I've also tried writing it in the <activity>, but it is not working there.

<activity
      android:name=".PlayVideo_Act"
      android:hardwareAccelerated="true"
      android:allowTaskReparenting="true"
      android:launchMode="singleTask"
      android:resizeableActivity="true"
      android:screenOrientation="locked"/>

Any help?

1

There are 1 best solutions below

0
Paul Lammertsma On

You can set android:resizeableActivity="false"` to individual activities that are not large screen optimized. Note the caveats for different API levels that are called out in the linked documentation, and further the guidance provided in the guide on multi-window support.