Disabling the multi-window function for Android N, not working on activity

I want to disable multi-window support for activity in my application. I set resizeableActivity to false in my manifest, but when I click the last application for a long time, the application goes into multi-window mode anyway. Below is my manifest:

 <activity android:name=".MainActivity" android:resizeableActivity="false" android:excludeFromRecents="true" android:icon="@drawable/ic_launcher_home" android:theme="@style/AppThemeV3.CustomToolbar"> </activity> 

Per documentation :

android:resizeableActivity=["true" | "false"]

If the attribute is set to false, the action does not support multi-window mode. If this value is false and the user tries to start the operation in multi-window mode, the action goes to full screen.

I also tried setting this attribute to false at the application level in the manifest, but it still runs in multi-window mode. Any pointer to what I am doing wrong would be highly appreciated?

+8
android android-7.0-nougat
source share
3 answers

The activity at the root of the task controls the size of the window. Your choice:

  • Keep track of all the possible actions in your application and make sure that they also have android:resizeableActivity="false"

  • Including this operation in another task using the Intent flags when it starts or manifests

+4
source share

[UPDATE] set android: resizeableActivity = "false" in the application tag. Now it will work.

+3
source share

I have encountered this problem before, and I have tried many times to find that you should add android: launchMode = "singleTask" && & & android: resizeableActivity = "false" at the same time.

0
source share

All Articles