Samsung's neat Multi Window functionality is making it's way into the wild... first with the Galaxy Note 2 and with the Galaxy S III to follow. This is great, but the downside is that not many apps support the functionality as yet. Developers - here's what you need to do to your app to add support!
It's actually rather easy. In your AndroidManifest.xml, do the following...
P
Click here to view the item
It's actually rather easy. In your AndroidManifest.xml, do the following...
- Make your application appear in the Multi Window bar. Add the MULTIWINDOW_LAUNCHER intent category to your application's main launcher activity... so just below your 'android.intent.category.LAUNCHER' line, add:
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
- Indicate you're using the Multi Window library. Include the following just before your </application> close tag:
<uses-library required="false" name="com.sec.android.app.multiwindow"> </uses-library>
- Add the metadata to indicate your application is Multi Window compatible. Add the following metadata again just before your </application> close tag:
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
- Specify the default window size. You should specify the default sizes for your Multi Window configuration using the additional metadata tags / dimens.xml entries below. The dimens.xml values below show the default values taken from Samsung's Gallery application, adjust for your needs if necessary.
Add the metadata again just before the </application> close 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" />
and in your dimens.xml:
<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>
P

Click here to view the item







Sign In
Create Account



Back to top









