fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

Android: Bottom Bar is transparent on Pixel 2 devices #1024

Open danhollick opened 6 years ago

danhollick commented 6 years ago

Fuse apps appear with a transparent Bottom Bar on Pixel 2 and Pixel 2 XL devices.

screenshot_20180216-114151-01

<!-- 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

Tapped commented 6 years ago

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.

Tapped commented 6 years ago

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.

kusma commented 6 years ago

@Tapped: It's to avoid glitches when hiding/showing the on-screen keyboard.

kusma commented 6 years ago

fusetools/fuselibs-private#4179 has some more information on this.

nekronos commented 6 years ago

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

danhollick commented 6 years ago

@nekronos Any progress on this?

trusis666 commented 6 years ago

Similar problem reported in forum.

fusebuild commented 6 years ago

The forum thread App is not scaled properly on Oreo with Pixel 2 XL posted by Daniel Billing was linked to this issue.

dsbilling commented 6 years ago

Waiting for a fix :)