Open or-else opened 1 year ago
BTW, it would be nice to replace the PNG icon with an SVG icon.
Just checked: it's not possible to subclass ImagePickerActivity
and override onOptionsMenuCreated
because ImagePickerLauncher.resultLauncher
is private.
The only way to change color of the icon is to fork the project and edit the code which is a shame.
Would like to reopen #144.
I would like to be able to change color of the Camera icon in the toolbar menu.
The change in the code is trivial, specifically, add one line to the menu item in https://github.com/esafirm/android-image-picker/blob/main/imagepicker/src/main/res/menu/ef_image_picker_menu_main.xml
Then define the color
cameraIconTint
in your style.xml. That's it.Alternatively, you can use vector icons with
android:tint
color defined in style. Like this:It's a highly unusual design decision to require custom component just to change color of a UI element. That's usually done with style.xml.
In the #144 you suggest to use custom components, but unfortunately there are no examples on how to do it. Would it be possible to provide some guidance on how to use it beyond what you have in custom_components.md?
I don't see anything related to toolbar styling in
interface ImagePickerComponents
: