Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Support split screen in Android N+ only on tablets

Is there a way to configure multi-window support for an activity only on screens large enough, e.g. tablet?

https://developer.android.com/preview/features/multi-window.html#configuring doesn't mention that. Setting android:minimalHeight and android:minimalWidth seems to not help, because

If the user moves the divider in split-screen mode to make an activity smaller than the specified minimum, the system crops the activity to the size the user requests.

Use case: for certain activities, it might not make sense to be run in very small (split) screen sizes. In those situations, the activity should not support multi-window mode.

like image 434
Dan Dascalescu Avatar asked Nov 08 '22 14:11

Dan Dascalescu


1 Answers

You could create multiple APKs (one for phone, one for tablet) using the tag

<supports-screens>

in your manifest, and then enable split screen support only on the tablet APK.

like image 170
Francesc Avatar answered Nov 14 '22 22:11

Francesc