SimonHalvdansson / Harmonic-HN

Modern Android client for Hacker News
https://play.google.com/store/apps/details?id=com.simon.harmonichackernews
Apache License 2.0
620 stars 39 forks source link

Add dynamic theme icon #30

Closed ramitsuri closed 1 year ago

ramitsuri commented 1 year ago

Adds dynamic theme icon that changes with user's theme colors. The change was easy and has been tested on API levels 24, 26, 28, 31,

  1. The old icon in unchanged but a new foreground icon is added which is vector drawable. It replaces the default foreground icon that was present but wasn't being used. The new foreground icon is then referenced as the monochrome icon.

Should fix #23

ramitsuri commented 1 year ago

Pixel 5 API 24

P5-24

Pixel 5 API 26

P5-26

Pixel 5 API 28

P5-28

Pixel 5 API 31

P5-31

Pixel 5 API 34 dynamic theme

P5-34-dynamic

Pixel 5 API 34 normal

P5-34-normal

ramitsuri commented 1 year ago

@SimonHalvdansson I converted the png icon in a tool to get the svg. But if you have the original svg, I can put that instead. The converted svg is almost perfect except for the top left bit where the crests of two waves have less separation than the original. This should be noticeable only in the dynamic theme icon.

SimonHalvdansson commented 1 year ago

Unofortunately I don't have the original anymore - it was just a PNG however. To be honest the icon should at the very least be updated to be vectorized in the original as the edges of the sines look a little off.

However that doesn't take away from this commit which looks good so I will be merging it.

I know a lot of people want dynamic icons so this should be a very welcome addition to the next update - thanks for your hard work!