gpt4 book ai didi

progressive-web-apps - 如何删除 TWA 中的底部导航栏?

转载 作者:行者123 更新时间:2023-12-05 06:25:59 28 4
gpt4 key购买 nike

我已经构建了一个 TWA,如 https://developers.google.com/web/updates/2019/02/using-twa 中所述

我想删除底部导航栏。我读到它只能通过 IMMERSIVE 模式以编程方式完成:https://developer.android.com/training/system-ui/immersive.html

所以我需要添加一个与事件“android.support.customtabs.trusted.LauncherActivity”关联的类,并在 onCreate() 中添加 hideSystemUI() 代码。

怎么做?

这是 list :

....
<activity
android:name="android.support.customtabs.trusted.LauncherActivity"
android:theme="@style/Theme.LauncherActivity"
android:label="@string/app_name">
....

如何为此事件编写沉浸式模式代码?

最佳答案

使用泡泡纸

使用 Bubblewrap 时(推荐),您将被询问应用程序应使用哪种显示模式作为 init 命令的一部分。

如果你已经初始化了应用,修改twa-manifest.json,设置displayfullscreen

在AndroidManifest.xml中

当您自己构建应用程序并使用默认的 LauncherActivity 时,您可以在 AndroidManifest.xml 中将以下元标记设置为 Activity 定义的一部分:

 <meta-data android:name="android.support.customtabs.trusted.DISPLAY_MODE"
android:value="immersive" />

关于progressive-web-apps - 如何删除 TWA 中的底部导航栏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56516639/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com