In the developer preview for Android N, multi-window support is enabled by default. How can I disable it for activites? Also what will happen if a multi-window enabled app launches my disabled activity?
3 Answers
In your manifest, you need:
android:resizeableActivity="false"
So in your manifest file, for each activity that you want to disable the feature in, it would be like:
<activity android:name=".SomeActivity"
android:label="@string/app_name"
android:resizeableActivity="false" />
Or, if you want to disable it in your entire app:
<application
android:resizeableActivity="false" >
. . .
</application>
As for what will happen, Android just won't let your app go into multi-screen mode - it will just stay full screen. See https://developer.android.com/preview/features/multi-window.html and https://developer.android.com/guide/topics/manifest/activity-element.html#resizeableActivity.

- 2,242
- 4
- 15
- 33

- 10,278
- 4
- 21
- 44
-
7For apps targeting Android N, setting this flag just gives a message that "App may not work in split mode" . But the app still goes to the split screen mode. – Diffy Aug 26 '16 at 10:46
-
1@Diffy this could be only possible if you enabled force multi window support from Developers options. – Syed Arsalan Shah Dec 16 '16 at 06:11
-
android:resizeableActivity="true" breaks the overall app design then how do i support split screen (app layout responsive design) in android nougat – Sarath Kumar Mar 01 '17 at 11:04
-
don't forget to change your targetSdkVersion over 24 for "android:resizeableActivity" working – OMArikan Oct 17 '17 at 07:41
-
@Diffy did you find any solution ? – Rahul Bh Jun 01 '21 at 09:22
Note: While starting a Unresizable Activity You should also add Intent.FLAG_ACTIVITY_NEW_TASK
flag to Intent.Otherwise it will inherit the properties from the root activity.
Add android:resizeableActivity="false"
for your Activity in your Manifest file or you can also add this for your Application:
<activity android:name=".YourActivity"
android:label="@string/app_name"
android:resizeableActivity="false" />

- 2,327
- 1
- 16
- 19
By the way, I added android:resizeableActivity="false"
to Manifest and then I switched language with Locale some Activities didn't change language. I noticed some activities have different resources. When I remove resizebleActivity property in Manifest it works OK.

- 1
- 1