我已经按照https://developers.google.com/web/updates/2019/02/using-twa上的描述构建了一个TWA
我想删除底部的导航栏。我读到它只能使用沉浸式模式以编程方式完成:https://developer.android.com/training/system-ui/immersive.html
因此,我想我需要添加一个与活动"android.support.customtabs.trusted.LauncherActivity“关联的类,并在onCreate()中添加hideSystemUI()代码。
如何做到这一点?
清单如下:
....
<activity
android:name="android.support.customtabs.trusted.LauncherActivity"
android:theme="@style/Theme.LauncherActivity"
android:label="@string/app_name">
....如何编写此活动的沉浸式模式?
发布于 2021-02-23 16:42:37
使用Bubblewrap
在使用Bubblewrap (推荐)时,系统将询问应用程序应在init命令中使用哪种显示模式。
如果您已经初始化了应用程序,修改twa-manifest.json,将display设置为fullscreen。
在AndroidManifest.xml中
当您自己构建应用程序并使用默认LauncherActivity时,您可以在AndroidManifest.xml中将以下元标记设置为活动定义的一部分
<meta-data android:name="android.support.customtabs.trusted.DISPLAY_MODE"
android:value="immersive" />https://stackoverflow.com/questions/56516639
复制相似问题