How to enable split screen in my Android app?

眉间皱痕 提交于 2020-02-21 09:52:36

问题


I want to enable Split Screen for my android app. If I try to drag my app to make it occupy the top half of my android device it gives the message "App doesn't support split screen". However, for other apps such as Facebook and WhatsApp, I am able to use split screen. I am using LGE Nexus 5X with Android 7 (nougat) which supports split screen.


回答1:


Add this to your application or activity tag in AndroidManifest.xml:

android:resizeableActivity=true

Adding it to application will make all activities realizable, while adding it to a specific activity will keep other activities incompatible with resizing.

If your targetSdkVersion is 24 (Nougat) or higher, this will be set to true by default (you can still turn it off by setting the param to false).



来源:https://stackoverflow.com/questions/39451988/how-to-enable-split-screen-in-my-android-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!