Add support for Samsung / Android Multi-Window (MultiTasking - MultiWindow) to your applications.
The problem or drawback of many applications is that they do not support or do not yet support the functionality.
Developers: This is what you need to do to add support to your applications!
It's actually quite easy. In your AndroidManifest.xml
, do the following:
Make your application appear in the Multi-Window bar. Add the intention category MULTIWINDOW_LAUNCHER
to the main activity launcher of the application, just below the 'android.intent.category.LAUNCHER'
line, add:
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
Indicates that you are using the Multi-Window library. Include the following just before your </application>
close the tag:
<uses-library required="false" name="com.sec.android.app.multiwindow"> </uses-library>
Add the metadata to indicate that your application supports Multi-Window. Add the following metadatos
again just before </application>
close the tag:
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
Specify the size of the default window.
You must specify the default sizes of the Multi-Window configuration using the metadatos
tags / additional entries in dimens.xml .
dimens.xml shows the default values taken from the Samsung Gallery application, conforms to your needs if necessary. ;).
Add the metadatos
again just before </application>
close the tag:
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:resource="@dimen/app_defaultsize_w" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:resource="@dimen/app_defaultsize_h" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:resource="@dimen/app_minimumsize_w" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:resource="@dimen/app_minimumsize_h" />[/code]
and in your dimens.xml :
[code]<dimen name="app_defaultsize_w">632.0dip</dimen>
<dimen name="app_defaultsize_h">598.0dip</dimen>
<dimen name="app_minimumsize_w">632.0dip</dimen>
<dimen name="app_minimumsize_h">598.0dip</dimen>
Additional documentation is in English but surely provides more information to become friends with the functionality.
I hope this guide will help you and solve the problem and everyone who goes through something similar.
Greetings!