Skip to content Skip to sidebar Skip to footer

Disable Split Screen Android

Good Day, I would like to disable split screen, and get the result what is shown in 'Expected Result' screenshot. (Toast with text 'App doesn't support split screen') In the 'Actu

Solution 1:

What I found ?

We can't set android:resizeableActivity="false" in the <application> tag it is ignored. (mistake google documentation)

It works when I set it to the main activity

<activityandroid:name=".activities.SplashScreenActivity"android:label="@string/app_name"android:theme="@style/splashScreenTheme"android:resizeableActivity="false"><intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter></activity>

Solution 2:

Add android:resizeableActivity="false" in application tag at manifest.xml file.

<applicationandroid:name=".activity.MyApplication"android:allowBackup="true"android:icon="@drawable/btn_share_myapplication"android:label="@string/app_name"android:resizeableActivity="false"android:supportsRtl="true"android:theme="@style/AppTheme"><activityandroid:name=".activity.SplashActivity"android:screenOrientation="portrait"><intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter></activity><activity... /></application>

Solution 3:

Try to set minHeight and miWidth as in example here:

<activityandroid:name=".MyActivity"><layoutandroid:defaultHeight="500dp"android:defaultWidth="600dp"android:gravity="top|end"android:minHeight="450dp"android:minWidth="300dp" /></activity>

Taken from: https://developer.android.com/guide/topics/ui/multi-window.html

Post a Comment for "Disable Split Screen Android"