Kiwix-android: Launch activity (night-mode) inverts colour of icons

Created on 22 Dec 2018  路  9Comments  路  Source: kiwix/kiwix-android

Describe the bug
Launch activity in night-mode inverts colour of the ZIM file icons

Expected behavior
The icons should retain their original colour

Steps to reproduce the behavior:

  1. Activate night-mode
  2. Navigate to the launch activity

Screenshots

screenshot_20181223-023547

Environment

  • Version of Kiwix Android : 2.4
  • Device : Moto G5 Plus
  • OS version : Oreo 8.1.0
bug

All 9 comments

Seems like a simple UI fix, as it doesn't occur in the library
I'll get to it

@Aditya-Sood thx

@kelson42 is this open for PR ?

@isaeef Like you can seem, @Aditya-Sood is assigned to the ticket and seems to work on it.

@isaeef you can use the no:assignee qualifier to search for unassigned issues

@kelson42 turns out it's not as simple as I'd expected
This launch activity is not a regular layout but a webview. From my understanding, the webview's night mode is currently being handled by having the GPU invert the entire view currently rendered on the screen (unlike how a layout's night mode is implemented, by setting the app to use a night mode theme).

However, this error of image inversion is restricted to this page only (images and figures within books are not inverted). I will need some time to figure out why this page is behaving differently and fix it.

@Aditya-Sood If I can remember we flip the webview on the Java end and then use css injection to flip the images.

https://github.com/kiwix/kiwix-android/blob/master/app/src/main/java/org/kiwix/kiwixmobile/data/ZimContentProvider.java#L485

This won't be run for non ZIM pages. So you will have to add manually.

Thanks @mhutti1
I'll see how to work with this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brijeshshah13 picture brijeshshah13  路  4Comments

Popolechien picture Popolechien  路  4Comments

asereze picture asereze  路  4Comments

siddharth2010 picture siddharth2010  路  4Comments

sonusourav picture sonusourav  路  5Comments