maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
923 stars 77 forks source link

Allow OptionSheet icons to be in colour #83

Closed russellbanks closed 3 years ago

russellbanks commented 3 years ago

Is your feature request related to a problem? Please describe. Icons get converted into black and white when in an Options Sheet meaning that either custom icons that use colour will look odd or a second variation that is a black outline is required for the sheet.

Describe the solution you'd like A function that allows the option to either have the icons in an Options Sheet in black and white or in colour.

Describe alternatives you've considered I have got around this problem elsewhere by making a custom sheet that uses icons in colour however it would be nice to have the option for icons in colour for the Options Sheet.

Additional context I have attached a video showing this - I have had to provide a black outlined icon whereas it would be nice to show it in colour within the sheet.

https://user-images.githubusercontent.com/74878137/129940146-d89041d0-577e-43d7-90da-d16ff853dfeb.mp4

maxkeppeler commented 3 years ago

Are the following methods not exactly doing this?

defaultIconColor(...)
defaultIconColorRes(...)
defaultIconColor(...)
defaultTitleColor(...)
defaultTitleColorRes(...)
defaultSubtitleColor(...)
defaultSubtitleColorRes(...)

If those individual option colors are not used, the Style attribute `sheetsIconsColor' is used next. You can see a working example, where each option has a different color, in my Aquafy app.

If I misunderstood your requirement, just reopen the issue!

russellbanks commented 3 years ago

I'm not sure whether I've misunderstood this but from looking at Aquafy and using those functions, it tints the icon whereas my intended idea is to have the image in full colour within the sheet. This means that it can contain many different colours. The defaultIconColor() is good for example for Google Icons, but not for ones on Flaticon (where I get some of my icons from).

To use the example from the video, I have this icon and I would like to show it in the sheet in full color. It contains roughly nine colours in it, so using defaultIconColor merely tints the whole thing to that colour.

I have attached a clearer picture below that shows my issue.

66430095-c42c-4133-a2f2-41e98350913c

maxkeppeler commented 3 years ago

Hmm now I start to get it. The drawable you provide should keep its colors - no tint should be applied. So a simple method to keep the drawable as it is without applying a tint will do the job, right?

Do you want this globally for all icons in an OptionsSheet or for each Option you added to it?

russellbanks commented 3 years ago

Yep, a simple method to keep the drawable as it is without applying a tint would be great, thank you!

For my aim, I'd only need it globally set within an OptionsSheet for uniformity. However, if it's possible to have both, it could mean that there is more customisability for other developers that may have that aim?