-1

I am making an Android app which I want to have LG Split Window Support but there isn't any info about it being possible or not and if possible how to do it. Can you help me solve this problem?

AurelaNYT
  • 3
  • 1
  • 4

1 Answers1

0

Quoting myself from my book, for LG's legacy split-screen support:

LG requires only one thing: a <meta-data> element in the <application>, with a name set to com.lge.support.SPLIT_WINDOW and a value of true. It assumes that your launcher activity (or activities) are suitable for showing in a split screen view.

This sample app shows supporting Android 7.0+ native multi-window, plus Samsung's and LG's legacy split-screen support. The manifest shows that <meta-data> element:

<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.commonsware.android.multiwindow"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:versionCode="1"
  android:versionName="1.0">

  <supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true" />

  <application
    android:allowBackup="false"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:resizeableActivity="true"
    android:theme="@style/Theme.Apptheme">
    <uses-library
      android:name="com.sec.android.app.multiwindow"
      android:required="false" />

    <meta-data
      android:name="com.sec.android.support.multiwindow"
      android:value="true" />
    <meta-data
      android:name="com.lge.support.SPLIT_WINDOW"
      android:value="true" />

    <activity android:name="MainActivity">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
      </intent-filter>
      <layout android:minWidth="480dp" />
    </activity>
  </application>

</manifest>
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491