Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 "Actual Result" screen you can see how android:resizeableActivity="false" affect on the app, but still split-screen enabled. How can I disable it at all ?

Actual Result:

enter image description here Expected Result:

enter image description here

like image 472
VLeonovs Avatar asked Oct 26 '16 09:10

VLeonovs


People also ask

How do I get rid of split screen display?

Removing Split To remove split after splitting the screen into two, double-click on the vertical or horizontal split boundary. The split is then removed. Alternatively, dragging the boundary to the left/right or top/bottom of the screen also removes the split.

Can you turn off split screen?

To exit Split View, slide the split-screen bar all the way to the left or right, depending on which app you want to close.

How do I remove split screen on my Samsung phone?

Split-screen using Recent Apps: Find the first app you want to use and tap on the app's icon. Select Open in split-screen view. You can now select which app you want to use on the other half of the screen. You can press the Home or Back buttons to exit the split-screen view.


Video Answer


2 Answers

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

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

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

    </activity>
like image 75
VLeonovs Avatar answered Sep 18 '22 21:09

VLeonovs


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

         <application
                android: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">
                <activity
                    android:name=".activity.SplashActivity"
                    android:screenOrientation="portrait">
                    <intent-filter>
                        <action android:name="android.intent.action.MAIN" />
                        <category android:name="android.intent.category.LAUNCHER" />
                    </intent-filter>
                </activity>
        <activity... />
        </application>
like image 29
Anil Singhania Avatar answered Sep 19 '22 21:09

Anil Singhania