How to restrict split-screen option in android studio

 


In order to restrict the split-screen option in Android Studio, you can add the android:resizeableActivity attribute to the AndroidManifest.xml file for each activity that you want to restrict.


Setting the android:resizeableActivity attribute to false will prevent the activity from being displayed in split-screen mode.


Here's an example of how to use the android:resizeableActivity attribute:


<activity android:name=".MainActivity"
    android:resizeableActivity="false"
    android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"/>


In this example, the MainActivity activity is marked as non-resizable, which means it will not be allowed to be displayed in split-screen mode.

You can use it in multiple activities.

It's worth noting that this only works on devices running Android 7.0 (Nougat) and later. On older versions of Android, split-screen mode is not available, so this attribute will have no effect.

Comments

Popular posts from this blog

Download ATTACK MODE Shwetabh Gangwar Course For Free

Apna College Alpha Course Free Download 2024

The Complete ReactiveX,Rxjava,andRxAndroid for Android Development MasterClass free Download