禁用分屏安卓 [英] Disable split screen android

查看:460
本文介绍了禁用分屏安卓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早安,

我想禁用拆分屏幕,并获得预期结果"屏幕快照中显示的结果. (带有文本应用程序不支持分屏"的祝酒词)

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")

在实际结果"屏幕中,您可以查看android:resizeableActivity="false"对应用程序的影响,但仍启用了分屏显示. 如何完全禁用它?

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 ?

实际结果:

预期结果:

推荐答案

我发现了什么?

我们不能在<application>标记中设置android:resizeableActivity="false",它会被忽略. (错误的Google文档)

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>

这篇关于禁用分屏安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆