openhab / openhab-android

openHAB client for Android
https://play.google.com/store/apps/details?id=org.openhab.habdroid
Eclipse Public License 2.0
600 stars 315 forks source link

Activate "Dynamic colors" by default #3185

Closed kaikreuzer closed 1 year ago

kaikreuzer commented 1 year ago

Version 3 changes the typical orange color of openHAB in the headers to a slightly weird brownish tone, which does not really seem to match the taste of many users and which also has no association to openHAB itself.

I noticed the setting "Dynamic colors", which in my case immediately improved my impression of the new design, as it chose the colors that I have anyhow selected for my OS. If a user does not like those colors, it is then clearly their own fault. 😎

I'd therefore like to propose to enable that setting by default instead of having users to find it first. Wdyt?

maniac103 commented 1 year ago

I don't have a strong opinion on this either way, I just have two remarks:

kaikreuzer commented 1 year ago

another color from the palette ('secondary container' -> 'primary container')

I don't think that will look any better when the OH orange is chosen as a primary color. So I would stick to the idea of this issue.

the 'slightly weird brownish tone' is just a lighter version of the OH orange

Well, I think it is a color that Google thinks fits well to the OH orange. It might, but as the OH orange does not really turn up anywhere anymore in the UI, the different browns become the dominant color of the interface. With the old design, we had the OH orange in the title, the toggles and the subtitles, so it was really "primary" and actively used.

Or are you talking about dark more?

I indeed tested it in dark mode, but in light mode it imho doesn't look any better.

maniac103 commented 1 year ago

on't think that will look any better when the OH orange is chosen as a primary color. So I would stick to the idea of this issue.

What I was heading at was the dynamic theme looking different after that change, not the default one.

Well, I think it is a color that Google thinks fits well to the OH orange.

It's a color an algorithm (developed by Google) thinks fit well to the OH orange. It's the same algorithm that extracts the colors from your wallpaper, just fed with a predefined color. This section talks about that algorithm a bit. It also shows how dark mode colors are not the same as light mode ones.

mueller-ma commented 1 year ago

Since the Basic UI theme (only the colors, not the exact look of the controls) is back again, I'd keep the themes for current installations as-is. For new installations on Android 12 the dynamic colors could be enabled IMO.

maniac103 commented 1 year ago

For new installations on Android 12 the dynamic colors could be enabled IMO.

On Android 12 the availability of dynamic colors is determined by checking manufacturer and/or brand. This is hard to replicate in (preference) XML. What about enabling it by default on Android 13+? That one is easy to do (have a string resource with the default value, overlay it in values-v33).

mueller-ma commented 1 year ago

It could be done in code here: https://github.com/openhab/openhab-android/blob/main/mobile/src/main/java/org/openhab/habdroid/ui/IntroActivity.kt#L127

Doing it on Android 13+ is also fine, I guess.