Menu text black on dark gray #85

Closed
opened 4 months ago by arwagner · 17 comments

0.56.2 re-introduced black text on dark gray background on some devices as it was reported in #27. (This is present in the most recent user debug as of this writing TinyWeatherForecastGermany-build025-version_0.56.2-userdebug-20210729-access_area_data_with_ContentResolver and I believe also in 0.56.3.)

isRelatedTo: #27, #74

0.56.2 re-introduced black text on dark gray background on some devices as it was reported in #27. (This is present in the most recent user debug as of this writing `TinyWeatherForecastGermany-build025-version_0.56.2-userdebug-20210729-access_area_data_with_ContentResolver` and I believe also in 0.56.3.) isRelatedTo: #27, #74
Poster

This persists in TinyWeatherForecastGermany-build025-version_0.56.2-userdebug-20210731-fixed_broken_areaDatabase_building.

This persists in `TinyWeatherForecastGermany-build025-version_0.56.2-userdebug-20210731-fixed_broken_areaDatabase_building`.
Starfish added the
bug
label 4 months ago
Starfish self-assigned this 4 months ago
Owner

This is a regression and it is likely because of the code changes for future theme support. Once the app supports multiple themes, I will do my best to fix it again.

This is a regression and it is likely because of the code changes for future theme support. Once the app supports multiple themes, I will do my best to fix it again.
Poster

This is a regression and it is likely because of the code changes for future theme support.

There seems to be a slight difference to the old issue. In the past (if I remember correctly) I had this behaviour in night mode only (always on on my device) while now it is independent of night mode.

Please note: I categorize this as minor inconvenience, just wanted to drop you a note that by some change it re-appeared. Especially as I have no idea about any additional side effects.

> This is a regression and it is likely because of the code changes for future theme support. There seems to be a slight difference to the old issue. In the past (if I remember correctly) I had this behaviour in night mode only (`always on` on my device) while now it is independent of night mode. Please note: I categorize this as _minor inconvenience_, just wanted to drop you a note that by some change it re-appeared. Especially as I have no idea about any additional side effects.
Owner

My fix was not a solutution, because it broke the hints (long-press the icon in the action bar), making the text not readable white-on-white.

In the next days (I hope I will have some time...) I will work on the theme support and will carefully check what to do. Perhaps I will be able to solve this issue properly.

My fix was not a solutution, because it broke the hints (long-press the icon in the action bar), making the text not readable white-on-white. In the next days (I hope I will have some time...) I will work on the theme support and will carefully check what to do. Perhaps I will be able to solve this issue properly.
arwagner referenced this issue from a commit 4 months ago
Owner

The forthcoming version after 0.56.4 will have theme support (dark theme, light theme, follow device theme). Color attributes have been tidied up massively.

Almost all values (except 8 app colors for each theme) are now simply the default setting, this also includes the menu text and background colors (!).

So, if things are still broken with this version (you can fetch a userdebug preview!), then most likely your manufacturer messed up the Holo theme (which the app uses) somewhere deep in the device theme definitions, e.g. here or here.

If the text still is "dark on dark", you can force-switch to the light theme (hoping the text won't be "white on white" 👀 ).

Please let me know if the new version solves this issue.

The forthcoming version *after* 0.56.4 will have theme support (dark theme, light theme, follow device theme). Color attributes have been tidied up massively. Almost all values (except 8 app colors for each theme) are now simply the default setting, *this also includes the menu text and background colors* (!). So, if things are still broken with this version (you can fetch a userdebug preview!), then most likely your manufacturer messed up the Holo theme (which the app uses) somewhere deep in the device theme definitions, e.g. [here](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/themes.xml) or [here](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/themes_device_defaults.xml). If the text still is "dark on dark", you can force-switch to the light theme (hoping the text won't be "white on white" 👀 ). Please let me know if the new version solves this issue.
Poster

Please let me know if the new version solves this issue.

Just tested with TinyWeatherForecastGermany-build027-version_0.56.4-userdebug-20210815-new_theme_support. Switching light/dark/follow device works as expected.

But I fear I still get "black text on dark gray" background if the device uses night mode. I do get "black on white", however, if I use day mode.

BTW: the radio for theme selection is unset by default seemingly defaulting to follow device. I wonder if the unset stage is intended. (Shows only if it was never touched.)

you can force-switch to the light theme

But this is indeed very bright white, indeed ;)

I have to admit, I am no fan of brightest white or darkest black, but given this choice only the dark themes are often slightly easier to the eye. (If I'd have any say, we'd go for the two Solarized to decide between night and day... ;)

I fear there is no fix for Holo theme you mentioned (or did I miss a hint?).

> Please let me know if the new version solves this issue. Just tested with `TinyWeatherForecastGermany-build027-version_0.56.4-userdebug-20210815-new_theme_support`. Switching light/dark/follow device works as expected. But I fear I still get "black text on dark gray" background if the device uses _night mode_. I do get "black on white", however, if I use _day mode_. BTW: the radio for theme selection is _unset_ by default seemingly defaulting to _follow device_. I wonder if the unset stage is intended. (Shows only if it was never touched.) > you can force-switch to the light theme But this is indeed very bright white, indeed ;) I have to admit, I am no fan of brightest white or darkest black, but given this choice only the dark themes are often slightly easier to the eye. (If I'd have any say, we'd go for the two [Solarized](https://ethanschoonover.com/solarized/) to decide between night and day... ;) I fear there is no fix for Holo theme you mentioned (or did I miss a hint?).
Owner

I added experimental support for

  • Solarized
  • Solarized dark

You can try it out.

I hope you like one of them better. The action bar on the top does not follow the Solarized theme yet, have to fix this later.

Regarding the messed-up Holo theme, any fix will break something somewhere else :-) .

There is good reason that Gxxgle said "The Holo themes must not be modified" in one of the files linked above :-)

Take Solarized, you'll be better off. The menus should be ok.

I added **experimental** support for * Solarized * Solarized dark You can try it out. I hope you like one of them better. The action bar on the top does not follow the Solarized theme yet, have to fix this later. Regarding the messed-up Holo theme, any fix will break something somewhere else :-) . There is good reason that Gxxgle said "The Holo themes must not be modified" in one of the files linked above :-) Take Solarized, you'll be better off. The menus should be ok.
Poster

You can try it out.

Thanks! This was quick. Just gave it a try. Some colours would need some adjustments, especially in the light version. E.g.

image

Also some textual display in the main screen uses an off combination giving very low contrast.

How is this themes stuff done? Is it something like there is some html apply this css? IOW given a mockup html and the css used, I could give it a try to sort this out. (Setting up a dev environment and compiling from scratch is probably beyond my capabilities.)

Take Solarized, you'll be better off. The menus should be ok.

Everything is fine in Solarized light, however the Solarized dark shows the same behaviour as the default night theme, that is black text on dark gray background. Juding from the colours, the menu does not get values from the theme at all. This is solarized dark on my device:

image

There is also a minor issue with the new warnings icon used. I think it was introduced only in the last userdebug (but I may be wrong). The icon got a bit large in the main panel, and gets in the way of the actual text:

image

> You can try it out. Thanks! This was quick. Just gave it a try. Some colours would need some adjustments, especially in the `light` version. E.g. ![image](/attachments/f45216a9-d026-4a1f-84c9-912945c68500) Also some textual display in the main screen uses an off combination giving very low contrast. How is this themes stuff done? Is it something like `there is some html apply this css`? IOW given a mockup html and the css used, I could give it a try to sort this out. (Setting up a dev environment and compiling from scratch is probably beyond my capabilities.) > Take Solarized, you'll be better off. The menus should be ok. Everything is fine in Solarized _light_, however the Solarized _dark_ shows the same behaviour as the default night theme, that is black text on dark gray background. Juding from the colours, the menu _does not_ get values from the theme at all. This is solarized dark on my device: ![image](/attachments/af87dcd7-29fa-4d7c-9755-1df28dd1d77f) There is also a minor issue with the new warnings icon used. I think it was introduced only in the last userdebug (but I may be wrong). The icon got a bit large in the main panel, and gets in the way of the actual text: ![image](/attachments/58d17abe-422c-4f01-af2f-4722104fc34e)
Owner

Yes, noted the too large icon as well. Should me a minor issue. Will continue work on the themes...

Yes, noted the too large icon as well. Should me a minor issue. Will continue work on the themes...
Owner

There is a new userdebug with improved Solarized support and overall better theming. The actionbar and the settings now also follow the theme.

There is also a 85% chance that your menu colors bug is fixed now. :-)

The low contrast in the Solarized Dark theme resulted from a mistake in the color assignment. This should be far better now.

There is a new userdebug with improved Solarized support and overall better theming. The actionbar and the settings now also follow the theme. There is also a 85% chance that your menu colors bug is fixed now. :-) The low contrast in the Solarized Dark theme resulted from a mistake in the color assignment. This should be far better now.
Poster

There is a new userdebug with improved Solarized support

Installed it right away :)

There is also a 85% chance that your menu colors bug is fixed now. :-)

I fear, here we are in the smaller part. The menu text is still just black. Always. (In solarized you'd never expect pitch black anywhere, so I guess this beast is not behaving right wrt themes. Maybe the themse support is just broken in my Android 9 Sony edition.)

mistake in the color assignment. This should be far better now.

Indeed it looks really good. :) I'll have to play a lot longer with it to see if something still exists, but at first glance...

Note that there is some destructive(?) interference though if the time gradient is enabled. This seems to drop some dark layer on top. It's hard(er) to spot in (solarized) dark themes, but quite apparent in solarized light. In view of full theme support you might want to check this:

image

I think this exists since day one and I only spot it now as I am pretty used ot solarized, and just know how it has to look. May this is even intended and I just get it wrong. I understood the gradient as a marker that "dimms" predictions in the longer distant future to notitfy the user that they are not as reliable as the near future. But it works exactly the other way round in the light themes the current ones get dimmed while the future is bright (= less dimm).

BTW: as solarized is an invertable theme it would probably also be a good choice for a "follow device" night/day mode. (I don't use this switching myself, I was just wondering.)

> There is a new userdebug with improved Solarized support Installed it right away :) > There is also a 85% chance that your menu colors bug is fixed now. :-) I fear, here we are in the smaller part. The menu text is still just _black_. Always. (In solarized you'd never expect pitch black anywhere, so I guess this beast is not behaving right wrt themes. Maybe the themse support is just broken in my Android 9 Sony edition.) > mistake in the color assignment. This should be far better now. Indeed it looks really good. :) I'll have to play a lot longer with it to see if something still exists, but at first glance... Note that there is some destructive(?) interference though if the _time gradient_ is enabled. This seems to drop some dark layer on top. It's hard(er) to spot in (solarized) dark themes, but quite apparent in solarized light. In view of full theme support you might want to check this: ![image](/attachments/886c3806-c1b4-4b61-8c68-1433987072b1) I think this exists since day one and I only spot it now as I am pretty used ot solarized, and just know how it has to look. May this is even intended and I just get it wrong. I understood the gradient as a marker that "dimms" predictions in the longer distant future to notitfy the user that they are not as reliable as the near future. But it works exactly the other way round in the light themes the current ones get dimmed while the future is bright (= less dimm). BTW: as solarized is an invertable theme it would probably also be a good choice for a "follow device" night/day mode. (I don't use this switching myself, I was just wondering.)
Owner

Thanks for the feedback, I did not check the gradient yet. This still needs to be done.

In Solarized, I now switched the darker and the lighter color, so that the lighter color is now the background for the text.

I think this looks even more better.

Up to now, I prefer both Solarized and Solarized_Dark over the other Light and Dark themes. Likely a good idea to make them default, when only following the device settings.

Thanks a lot for suggesting Solarized, I was not aware of this theme!

Just a sidenote: the intro crashes in the userdebug, as theme support still needs to be implemented there. Just working on that.

Thanks for the feedback, I did not check the gradient yet. This still needs to be done. In Solarized, I now switched the darker and the lighter color, so that the lighter color is now the background for the text. I think this looks even more better. Up to now, I prefer both Solarized and Solarized_Dark over the other Light and Dark themes. Likely a good idea to make them default, when only following the device settings. Thanks a lot for suggesting Solarized, I was not aware of this theme! Just a sidenote: the intro crashes in the userdebug, as theme support still needs to be implemented there. Just working on that.
Owner

gradient is fixed: 7f0dc9f78e+

Solarized and Solarized_Dark are the standard themes now :-)

Original issue: the Holo theme is likely broken on your device, seems like this cannot be solved properly. The app overwrites both the background value and the textcolor value in xml, but your device seems to ignore the second one.

gradient is fixed: https://codeberg.org/Starfish/TinyWeatherForecastGermany/commit/7f0dc9f78e3a7c9d3176243eb30d57febbfc4d53+ Solarized and Solarized_Dark are the standard themes now :-) Original issue: the Holo theme is likely broken on your device, seems like this cannot be solved properly. The app *overwrites* both the background value and the textcolor value in xml, but your device seems to ignore the second one.
Poster

gradient is fixed

:) Just to ask, the gradient does not start with the initial colour and then just darkens (in a light theme) or lightens (in a dark theme) but it starts out lightening (darkening) the first hours, so somewhere in the middle we end up in the initial colour, right?

Solarized and Solarized_Dark are the standard themes now :-)

Seems you like it. :) Just it case, there are tons of implementations for the most important applications like the shell, vi(m) and also css etc. (I've a pretty solarized desktop. ;)

Original issue: the Holo theme is likely broken on your device, seems like this cannot be solved properly.

BTW: I have this black on dark even in solarized, it's not limited to the standard dark theme:

image

And the funny thing is that it worked at some point in time. Going back to #27, back in the day it was fixed in

#27

and you referenced commit c4fb7da6b9

That is a huge one, however, adding quite a bit of other stuff. But, if I am not mistaken, and compare it with the first attempt in said issue (a much smaller first attempt that touched only styles.xml), the trick seems to have been

   <!-- Base application theme. -->
    <style name="AppTheme" parent="android:Theme.Holo">

        <item name="android:actionMenuTextColor">@color/textColor</item>
        
   <!-- [...] -->

   <!-- Customize overflow menu -->
    <style name="OverflowMenu" parent="android:Theme.Holo">
    
        <item name="android:color">@color/textColor</item>

These two lines seem don't exist in the current styles.xml. But maybe they are not compatible with the themes support.

> gradient is fixed :) Just to ask, the gradient does not start with the initial colour and then just darkens (in a light theme) or lightens (in a dark theme) but it starts out lightening (darkening) the first hours, so somewhere in the middle we end up in the initial colour, right? > Solarized and Solarized_Dark are the standard themes now :-) Seems you like it. :) Just it case, there are tons of implementations for the most important applications like the shell, vi(m) and also css etc. (I've a pretty solarized desktop. ;) > Original issue: the Holo theme is likely broken on your device, seems like this cannot be solved properly. BTW: I have this black on dark even in solarized, it's not limited to the standard dark theme: ![image](/attachments/08bcdb26-dec9-4112-b1eb-364e3eaf226c) And the funny thing is that it worked at some point in time. Going back to #27, back in the day it was fixed in https://codeberg.org/Starfish/TinyWeatherForecastGermany/issues/27#issuecomment-156778 and you referenced commit https://codeberg.org/Starfish/TinyWeatherForecastGermany/commit/c4fb7da6b91be7fc69d40b76f643cbe02655a140 That is a huge one, however, adding quite a bit of other stuff. But, if I am not mistaken, and compare it with the first attempt in said issue (a much smaller first attempt that touched only `styles.xml`), the trick seems to have been ``` <!-- Base application theme. --> <style name="AppTheme" parent="android:Theme.Holo"> <item name="android:actionMenuTextColor">@color/textColor</item> <!-- [...] --> <!-- Customize overflow menu --> <style name="OverflowMenu" parent="android:Theme.Holo"> <item name="android:color">@color/textColor</item> ``` These two lines seem don't exist in the current `styles.xml`. But maybe they are not compatible with the themes support.
Owner

This is just a stub and never had any effect. I finally removed it to stop any confusion. The only way to successfully set the color on your device is using a spannable in the MainActivity.class . After introducing the themes, this got broken.

No one except you noticed, because the colors are ok on all other devices :-)

Fixed, hoping it does not have any unpredictable side effects on the themes: 7b04dc17ec

Just to clarify: on most devices, including all my test devices, this fix has no effect at all because the colors are already set correctly by the theme. This is a tweak to fix something that is likely broken on your device. You are the only one that ever reported this :-)

See userdebug, can you please check it works now?

This is just a stub and never had any effect. I finally removed it to stop any confusion. The only way to successfully set the color on your device is using a spannable in the MainActivity.class . After introducing the themes, this got broken. No one except you noticed, because the colors are ok on all other devices :-) Fixed, hoping it does not have any unpredictable side effects on the themes: https://codeberg.org/Starfish/TinyWeatherForecastGermany/commit/7b04dc17ec6e38cafd4e8eaf6603e0e7b8660216 Just to clarify: on **most** devices, including all my test devices, this fix has **no effect** at all because the colors are already set correctly by the theme. This is a tweak to fix something that is likely broken on your device. You are the only one that ever reported this :-) See userdebug, can you please check it works now?
Poster

This is just a stub and never had any effect.

Ah, ok. I was just comparing the two diffs that should have attacked the issue.

See userdebug, can you please check it works now?

It does indeed. Tested the userdebug and switched between all themes. Thank you :)

This is a tweak to fix something that is likely broken on your device.

If I get

if ((Build.HARDWARE.equals("qcom")) && (Build.PRODUCT.equals("G8441"))){

right it is restricted now to the XPeria XZ1 Compact.

You are the only one that ever reported this :-)

Maybe my Sony is a rare thing? Maybe it's something in the SONY ROM?

> This is just a stub and never had any effect. Ah, ok. I was just comparing the two diffs that should have attacked the issue. > See userdebug, can you please check it works now? It does indeed. Tested the userdebug and switched between all themes. Thank you :) >This is a tweak to fix something that is likely broken on your device. If I get ``` if ((Build.HARDWARE.equals("qcom")) && (Build.PRODUCT.equals("G8441"))){ ``` right it is restricted now to the `XPeria XZ1 Compact`. > You are the only one that ever reported this :-) Maybe my Sony is a rare thing? Maybe it's something in the SONY ROM?
Poster

Seems to work from in all tested user debugs up to 0.57.1-20210912 (the most recent one at the time of writing.

Seems to work from in all tested user debugs up to 0.57.1-20210912 (the most recent one at the time of writing.
arwagner closed this issue 2 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.