Page MenuHomePhabricator

Enabling dark theme on android widgets
Closed, DuplicatePublic

Description

There are two Wikipedia widgets on android, and both of them when enabled, is shown in the light theme, even if the Wikipedia app is enabled on dark theme

I'm a dark theme user and here's what the widgets looks like on android

IMG_20210403_220731.jpg (1×1 px, 856 KB)

The goal of this project is to enable the use of dark theme for widgets

Docs on dark theme widgets - Android Developers (link)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It is unclear which colors we should be using in each style. The original colors (only light ones) for the Featured Article widget are white70 for the background, base10 for the content and base30 for the header.
But, in the styles_light.xml file those colors aren't listed anywhere as text colors, rather material_theme_primary_color and material_theme_secondary_color, which I would assume is what we would want, are actually black87 and black54 respectively. Is there some kind of policy on text colors or do I have the liberty to change it to the standard colors (those latter colors I mentioned)?
Furthermore, widget_shape_inner.xml and widget_shape_background.xml are identical files that have different effects on the widget. the former is applied on the inner part of the widget (that can be seen in the task description) and is lighter than the general background, which is the latter. How are these two identical files reflecting different colors in the widget?

@Mr_Patoot This task requires more design than developer attention at the moment, and is probably not ready to be worked on yet.

Seddon added a subscriber: Mr_Patoot.