CustomArrayAdapter
Demo code showing good use of array adapter
Install / Use
/learn @IEnoobong/CustomArrayAdapterREADME
Custom Array Adapter
Simple Android Kotlin Library to help create custom array adapters for adapter views like spinners
Read Customer Array Adapter for reasons, see sample code for too
Setup
Gradle
implementation "co.enoobong:customarrayadapter:$custom_array_adapter_version"
Usage
- Make your model class that you intend to display in adapter implement
ModelDisplayName. This will require you to override thedisplayNameproperty; which is the value that will be displayed in your adapter. - In your
ActivityorFragmentwhere you use theAdapterViewset it's adapter toCustomArrayAdapter(context, layoutResource, listOfValues)eg
spinner.adapter = CustomArrayAdapter(context, android.R.layout.simple_spinner_item, values = listOfValues)
Contributing
I'm more than welcome to contributions that improve the library and make it easier to use. If you are willing to contribute to the project feel free to make a fork and submit a pull request. You can hit me up on @IEnoobong on Twitter
Donate
Want to buy me Jollof-Rice? Send here's my link https://payme.ng/ienoobong Thanks
