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
921 stars 77 forks source link

Option customisation support #114

Closed ItzNotABug closed 1 year ago

ItzNotABug commented 2 years ago

Currently, there is no support for customizing Option based items. Example: a Font List, different colours depending on the index, etc.

Describe the solution you'd like Support customizing the title & subtitle TextViews completely like:

// Option
Option(/* Existing constructor args */, titleCust: (TextView.() -> Unit)? = null, subTitleCust: (TextView.() -> Unit)? = null)

// Usage
Option(R.drawable.menu_icon, "Menu Item", titleCust = { /*...*/ }, subTitleCust = { /*...*/ })
maxkeppeler commented 1 year ago

I believe it's a specific requirement that not many need. Therefore, I do not want to add it to the lib. Feel free to fork it and add that change and use it in your project. Sorry!