apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

Changed 3-dot menu color in custom picker (#6423)

Open JohnSchneuker opened this issue 1 year ago • 13 comments

Fixes #6423

What changes did you make and why?

  • Added drawables ic_overflow_black and ic_overflow_white

  • Added overflow_menu_button attribute to switch between white and black drawables depending on if theme is light or dark

  • Set Overflow Menu Icon srcCompat to overflow_menu_button attribute

Tests performed:

  • Checked both light and dark theme displayed proper drawable using virtual Phone within Android Studio

Tested BetaDebug on virtual Medium Phone with API 36.1

Screenshots:

image

image

JohnSchneuker avatar Oct 06 '25 03:10 JohnSchneuker

Please update your PR description to follow the default template, @JohnSchneuker. You are currently missing the linked issue in the PR.

rohit9625 avatar Oct 06 '25 07:10 rohit9625

@rohit9625 Sorry about that, I added the link and made the description match the template more.

JohnSchneuker avatar Oct 06 '25 13:10 JohnSchneuker

The 3-dot icon looks great on both dark and light themes:

https://github.com/user-attachments/assets/647cf668-c572-49b9-ab08-2a6a190d79c1

rohit9625 avatar Oct 07 '25 19:10 rohit9625

Hi @nicolas-raoul, I want to merge this PR. So, are there any additional steps that I need to take, such as adding something to the merge commit's description or keeping it as the default?

rohit9625 avatar Oct 07 '25 19:10 rohit9625

Interestingly the "Nearby" activity's 3-dots button looks great in both dark and light modes. Is there a specific reason why adding these two files is necessary here?

nicolas-raoul avatar Oct 09 '25 01:10 nicolas-raoul

Hi @nicolas-raoul, on the nearby screen, we are using the global options menu by calling: https://github.com/commons-app/apps-android-commons/blob/755d8311dc8516843091586102e431d2de3d9a20/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.kt#L386

Where the menu items are provided by this callback: https://github.com/commons-app/apps-android-commons/blob/755d8311dc8516843091586102e431d2de3d9a20/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.kt#L392-L401

And for the Custom Selector, the menu icon was added using a drawable resource file. I think that's why John added drawable files. So, if want, we can add the menu item for the Custom Selector in the same way as NearbyParentFragment. However, I didn't check for duplicate resource files. @JohnSchneuker, are you sure that the files you added were not already present?

rohit9625 avatar Oct 09 '25 02:10 rohit9625

Thanks Rohit!

By the way, to merge, clicking the green "Squash and merge" button is enough. 🙂

nicolas-raoul avatar Oct 09 '25 04:10 nicolas-raoul

The files for black and white might have already been present under a different name, I'm not sure. I would have to look at all the drawables to be sure. All I know was there was initially only a singular drawable file with the term ic_overflow, which is why I added the additional two files.

JohnSchneuker avatar Oct 09 '25 15:10 JohnSchneuker

Hi @JohnSchneuker, I found that we have a drawable file ic_more_vert_white_24dp which is a 3 dot menu icon. This file has only one usage here: https://github.com/commons-app/apps-android-commons/blob/0a4b179db5253451d100ec32d0f3070676a00625/app/src/main/res/menu/menu_notifications.xml#L8

But removing that usage doesn't have any effect on the Notification Screen's menu icon because that is added using global menu options. Don't worry about that. Also, if you noticed that this ic_more_vert icon is supposed to be white in color, as its name says, but it's actually black. So, please rename it correctly or change the fillColor of this drawable to match the name, and create another variant of this drawable for the opposite theme to use at CustomSelector.

Thanks :)

rohit9625 avatar Oct 11 '25 05:10 rohit9625

✅ Generated APK variants!

github-actions[bot] avatar Oct 14 '25 12:10 github-actions[bot]

@JohnSchneuker did you get a chance to review Rohit's suggestions? We'll quickly merge once they're addressed. Thanks a lot! :)

RitikaPahwa4444 avatar Oct 18 '25 12:10 RitikaPahwa4444

Hi @JohnSchneuker, what is the update here?

rohit9625 avatar Oct 25 '25 17:10 rohit9625

Hi @JohnSchneuker, please update your PR with the above suggested changes, or feel free to ask if you have any doubts. Please let us know if you're unavailable to take this forward :)

rohit9625 avatar Nov 09 '25 16:11 rohit9625