ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.71k stars 2.24k forks source link

Implement monochrome icon for AnkiDroid #13197

Closed mikehardy closed 1 year ago

mikehardy commented 1 year ago

Android 12+ has "Material You" which has monochrome icons as the base for all the color theme capabilities

They have added a lint check with gradle 7.4+ that verifies you have a monochrome icon, which we do not have yet

I'll be disabling that lint check (temporarily, the PR that closes this issue should re-enable it) in order to get #13186 through

Here is a good article explaining that we need someone to:

1) implement a monochrome version of the adaptive icon (I'm fine with a black and white version, personally) 2) decide if we need to keep the round icon. We may be able to remove it? Unsure. If it's not clear, leave it but make a monochrome version of it as well

https://proandroiddev.com/android-13-implementing-themed-icons-into-your-app-e7002f2c4e04

Here's the stackoverflow of interest as well: https://stackoverflow.com/questions/71109063/how-to-implement-a-themed-monochrome-icon-for-material-you

zaidazaize commented 1 year ago

hey ,I would like to work on this can you assign this issue to me

mikehardy commented 1 year ago

sure - thanks and good luck!

BrayanDSO commented 1 year ago

Odd. I thought that #13055 would have solved this

mikehardy commented 1 year ago

Great point @BrayanDSO ! That went through while I was away from the project and I haven't read through all the PRs yet, I didn't know about that. Seems that should have handled it, why didn't it !? Very curious.

n1snt commented 1 year ago

For me it seems to be working fine.

Screenshot_20230207-112234_Pixel Launcher.png

n1snt commented 1 year ago

I removed these 2 lines & still didn't have any warnings.

    <!-- new with AGP7.4+, tracking in https://github.com/ankidroid/Anki-Android/issues/13197 -->
    <issue id="MonochromeLauncherIcon" severity="ignore" />

Am I missing something? Or is this issue already fixed?

RahulTulsani commented 1 year ago

i want to work on this issue please assign me this issue

zaidazaize commented 1 year ago

Hey i have tested this on android 13 emulator it behaves correctly. Could you be specific on which device it was not working @mikehardy. I have attached the screenshort of it. Screenshot from 2023-02-15 01-29-11

vannekariabhiram commented 1 year ago

hi mikehardy i want to work on this issue i.e creating monochorme icon could you assign it to me

david-allison commented 1 year ago

@mikehardy Could you post the device/emulator settings which display this issue? A number of users have not been able to reproduce this

If anyone here has a reproduction case, it'd be great to post it

mikehardy commented 1 year ago

To be clear - it is not that I reproduced any particular issue on any particular device

What I had a problem with was upgrading gradle plugin and the lint check failing, as stated here:

They have added a lint check with gradle 7.4+ that verifies you have a monochrome icon, which we do not have yet

I'll be disabling that lint check (temporarily, the PR that closes this issue should re-enable it) in order to get https://github.com/ankidroid/Anki-Android/pull/13186 through

I had a lint failure - that is gradle failed the build because a lint check failed and I added this to make it pass lint:

https://github.com/ankidroid/Anki-Android/pull/13186/files#diff-e2167eb133d926fe0039f198c4dd0a2b413122b9ba9d6abe8af9804da1d389e3R66-R68

That's it - that's all I know.

@n1snt indicates that it was unnecessary on further testing? https://github.com/ankidroid/Anki-Android/issues/13197#issuecomment-1425177312

So the possible outcome of this is simply: make a PR that reverts that commit and maybe that's it? Indicating that my testing of that commit was simply insufficient for some unknown reason

mikehardy commented 1 year ago

So David posted that PR (even better: converted it to a fatal actually) and it worked fine. Must have been something wrong in my process, my sincere apologies for everyone's wasted time here