fuselibs
fuselibs copied to clipboard
Android: Bottom Bar is transparent on Pixel 2 devices
Fuse apps appear with a transparent Bottom Bar on Pixel 2 and Pixel 2 XL devices.
<!-- MainView.ux -->
<App Model="SomeModel">
<ClientPanel Background="#000">
<Navigator Pages="{navigation.pages}" >
<MyPage ux:Template="MyPage"/>
</Navigator>
</ClientPanel>
</App>
ClientPanel
and BottomBarBackground
have no effect on the color/transparency of this area. Removing them has no effect either. It almost seems as though Fuse can't draw behind this area at all.
I wonder if it has anything to do with this launcher, which comes installed on these devices and cannot be disabled: https://play.google.com/store/apps/details?id=com.google.android.apps.nexuslauncher&hl=en
Note that this problem does not occur on the Pixel 1 series, which as far as I know use the same launcher but have opaque bottom bars
I've investigated it, and it's caused by the transparency setting https://github.com/fusetools/uno/blob/631db10ce57c059f62dcad61cd8203b303ccccea/Library/Core/UnoCore/Targets/Android/app/src/main/res/values/styles.xml#L8
I had hoped that <item name="android:navigationBarColor">@android:color/black</item>
would help, but the Google Launchbar (navbar used in the Pixel series) doesn't respect that setting. It looks like the Google Launchbar is transparent, so the color of the bar is actually set by the android:windowBackground
when android:windowIsTranslucent
is false.
@kusma @mortoray Do any of you remember why the app has to be transparent? I've tested text input etc. and it worked fine even though the app wasn't transparent.
Another thing, everything drawn at the bottom area is clipped as well, so it seems like it's only the android:windowBackground
it respects. Or that it doesn't support capturing of GL views, since I've not tested the use of NativeViews
.
@Tapped: It's to avoid glitches when hiding/showing the on-screen keyboard.
fusetools/fuselibs-private#4179 has some more information on this.
Looks like we have to disable transparent theme. I tested and confirmed that the visual glitches in TextInput still exists. Not sure how to proceed
@nekronos Any progress on this?
Similar problem reported in forum.
The forum thread App is not scaled properly on Oreo with Pixel 2 XL posted by Daniel Billing was linked to this issue.
Waiting for a fix :)