0

I'm using the SVGOMG-TWA Trusted Web Activity example from the Google Labs example (https://github.com/GoogleChromeLabs/svgomg-twa). How do I remove this white bar above the navigation bar? In this example, in styles.xml is configured only for the parameters of the splash screen that appears before loading the site view itself. The site itself is dark, as well as the colors of all the panels in the app. During the display of the splash screen, this band is missing, so I came to the conclusion that this is either part of the "site browsing activity" itself, or it does not fill the entire height of the screen and there is a free space, which is painted white. All colors in @color are dark.

Here is the styles styles.xml:

<resources>
<!— Theme to create a blank screen while the TWA is opening —>
<style name= "Theme.LauncherActivity" parent="Theme.AppCompat.NoActionBar">
<item name= "android:windowIsTranslucent">true</item>
<item name= "android:windowBackground">@color/colorPrimaryDark</item>
<item name= "android:statusBarColor">@color/colorPrimary</item>
<item name= "android:navigationBarColor">@color/colorPrimary</item>
<item name= "android:backgroundDimEnabled">false</item>
</style>
</resources>

And this is a part of the AndroidManifest AndroidManifest.xml:

<meta-data android:name= "android.support.customtabs.trusted.STATUS_BAR_COLOR"
android:resource="@color/colorPrimary" />

Thus, the example sets the color of the status bar for the site viewing itself after the splash screen is displayed, but if you set the background color in the same way, nothing changes and the white bar still remains.

I attached a screenshot of the app with the opened site and this white line: https://i.stack.imgur.com/0OhZH.png

I also tried to look for other examples of TWA implementation, but they also had this band and they themselves were not functional. If you know of other ways to implement a PWA application without using Chrome and standard WebView, then I would be very happy to learn about them.

If the device has a battery charge of less than 10%, the page itself reloads and this white bar is removed. The color of the Status Bar also changes to light gray, although the color is specified for it. Maybe it's connected in some way.

I would be very grateful for any help!

1 Answers1

0

This is not currently possible. There's a feature request for this to be implemented here: http://crbug.com/1021436

andreban
  • 4,621
  • 1
  • 20
  • 49