3

I have build a TWA as described at https://developers.google.com/web/updates/2019/02/using-twa

I want to remove the bottom navigation bar. I have read that it can only be done programmatically with IMMERSIVE mode : https://developer.android.com/training/system-ui/immersive.html

So i need to add a Class associated to the activity "android.support.customtabs.trusted.LauncherActivity" and to add the hideSystemUI() code in onCreate() i guess.

How to do that ?

Here is the manifest :

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

How to code the immersive mode for this activity ?

JeffProd
  • 3,088
  • 1
  • 19
  • 38
  • There's currently an open bug to implement this feature: https://bugs.chromium.org/p/chromium/issues/detail?id=965329 – andreban Jun 18 '19 at 20:46

1 Answers1

1

Using Bubblewrap

When using Bubblewrap (recommended), you will be asked which display mode the application should use as part of the init command.

If you have already initialized the application, modify twa-manifest.json, set display to fullscreen.

In AndroidManifest.xml

When building the application yourself and using the default LauncherActivity, you can get set the following meta-tag as part of the Activity definition in AndroidManifest.xml:

 <meta-data android:name="android.support.customtabs.trusted.DISPLAY_MODE"
                android:value="immersive" />
andreban
  • 4,621
  • 1
  • 20
  • 49