javacafe01/PdfViewer

[Bug] Bottom Nav Bar Colors

javacafe01 opened this issue · 6 comments

@Fs00

It was totally my fault for not checking before the merge, but the change done here prevents the bottom bar from changing colors as Cyanea changes the theme. For now I have reverted that line back.

Fs00 commented

I tested on several "real" devices and bottom bar color gets changed correctly with my change. I get this issue consistently only in Android emulator, even after your revert. Did you spot this on a physical device?

Fs00 commented

On Android 11 emulator I noticed a slightly different behavior: after your revert, the color gets changed correctly. However, version 3.3 of the app (which had been the latest version for almost a year) had the following line instead:
https://github.com/JavaCafe01/PdfViewer/blob/390ed87fbd826c127fdee22db418ee5ca8641ef4/app/src/main/res/layout/activity_main.xml#L42

Which still triggers the bug on Android 11 emulator, but not on the physical devices I tested. It seems like that using android:background attribute on emulators triggers some weird issue.
I would rather keep the change that fixes ripple and ignore this issue if it doesn't happen on real devices (I will try to find a more robust solution though).

Good to know, if it works on my physical device I'll change it back to android:background

@Fs00 android:background="@color/cyanea_primary_reference" didn't work on my device, or the emulator (even after an app restart, the color was the original). For now, I'm going to revert to app:itemBackground="@color/cyanea_primary_reference". I use Android 11, so it maybe a specific android issue, or with cyanea?

Fs00 commented

Thanks for your testing, my most recent real device has Android 10 on it so I couldn't catch this issue on a real device.
In the meantime I tried other approaches but none of them did work better.
Surely Cyanea plays an important role in this bug, it seems too much theming magic for Android (and Material Components) to handle :/

Fixed in #104