Skip to content

Conversation

JohnSchneuker
Copy link

@JohnSchneuker JohnSchneuker commented Oct 6, 2025

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

* 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
@rohit9625
Copy link
Collaborator

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

@JohnSchneuker
Copy link
Author

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

@rohit9625
Copy link
Collaborator

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

Screen_recording_20251008_010158.mp4

@rohit9625
Copy link
Collaborator

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?

@nicolas-raoul
Copy link
Member

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?

@rohit9625
Copy link
Collaborator

rohit9625 commented Oct 9, 2025

Hi @nicolas-raoul, on the nearby screen, we are using the global options menu by calling:

Where the menu items are provided by this callback:

override fun onCreateOptionsMenu(
menu: Menu,
inflater: MenuInflater
) {
inflater.inflate(fr.free.nrw.commons.R.menu.nearby_fragment_menu, menu)
val refreshButton = menu.findItem(fr.free.nrw.commons.R.id.item_refresh)
val listMenu = menu.findItem(fr.free.nrw.commons.R.id.list_sheet)
val showInExploreButton = menu.findItem(fr.free.nrw.commons.R.id.list_item_show_in_explore)
val saveAsGPXButton = menu.findItem(fr.free.nrw.commons.R.id.list_item_gpx)
val saveAsKMLButton = menu.findItem(fr.free.nrw.commons.R.id.list_item_kml)

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?

@nicolas-raoul
Copy link
Member

Thanks Rohit!

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

@JohnSchneuker
Copy link
Author

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.

@rohit9625
Copy link
Collaborator

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:

android:icon="@drawable/ic_more_vert_white_24dp"

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 :)

Copy link

✅ Generated APK variants!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom picker: Three-dots menu difficult to see in dark mode

3 participants