有没有一种方法可以只在足够大的屏幕上为 Activity 配置多窗口支持,例如平板电脑?
https://developer.android.com/preview/features/multi-window.html#configuring没有提到那个。设置 android:minimalHeight
和 android:minimalWidth
似乎没有帮助,因为
If the user moves the divider in split-screen mode to make an activity smaller than the specified minimum, the system crops the activity to the size the user requests.
用例:对于某些 Activity ,在非常小(拆分)的屏幕尺寸下运行可能没有意义。在这些情况下, Activity 不应支持多窗口模式。
最佳答案
您可以使用标签创建多个 APK(一个用于手机,一个用于平板电脑)
<supports-screens>
在您的 list 中,然后仅在平板电脑 APK 上启用分屏支持。
关于android - 仅在平板电脑上支持 Android N+ 中的分屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37402060/