Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AmrDeveloper/EasyAdapter
Android Annotation Processing Library to generate your adapters only with Annotations on your model, support working with Kapt and KSP Processors
https://github.com/AmrDeveloper/EasyAdapter
adapter adapter-design-pattern android android-library annotation-processor kapt kotlin kotlinpoet ksp lint linter-plugin
Last synced: 3 months ago
JSON representation
Android Annotation Processing Library to generate your adapters only with Annotations on your model, support working with Kapt and KSP Processors
- Host: GitHub
- URL: https://github.com/AmrDeveloper/EasyAdapter
- Owner: AmrDeveloper
- License: mit
- Created: 2021-12-08T19:07:56.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-26T20:12:56.000Z (over 2 years ago)
- Last Synced: 2024-10-27T12:51:27.284Z (3 months ago)
- Topics: adapter, adapter-design-pattern, android, android-library, annotation-processor, kapt, kotlin, kotlinpoet, ksp, lint, linter-plugin
- Language: Kotlin
- Homepage: https://amrdeveloper.github.io/EasyAdapter/
- Size: 813 KB
- Stars: 81
- Watchers: 5
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-list - AmrDeveloper/EasyAdapter - Android Annotation Processing Library to generate your adapters only with Annotations on your model, support working with Kapt and KSP Processors (Kotlin)
README
# EasyAdapter
![Maven Central](https://img.shields.io/maven-central/v/io.github.amrdeveloper/easyadapter?color=green)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/2b074c0ffc1e4ac3b0ddf085e09e940c)](https://www.codacy.com/gh/AmrDeveloper/EasyAdapter/dashboard?utm_source=github.com&utm_medium=referral&utm_content=AmrDeveloper/EasyAdapter&utm_campaign=Badge_Grade)
[![CodeFactor](https://www.codefactor.io/repository/github/amrdeveloper/easyadapter/badge)](https://www.codefactor.io/repository/github/amrdeveloper/easyadapter)Android Annotation Processor library to generate adapter class easily from your model with a lot of customization
```Kotlin
const val APP_ID = "com.amrdeveloper.app"
const val MODEL_LIST_ITEM = "list_item_model"@BindListener(ListenerType.OnClick)
@BindListener(ListenerType.OnLongClick)
@BindListener(ListenerType.OnClick, "model_name")
@ListAdapter(APP_ID, MODEL_LIST_ITEM)
data class Model (@BindText("model_name")
val name : String,@BindImage(ImageLoader.COIL, "model_avatar")
val avatarUrl : String,@BindAlpha("model_avatar")
val avatarAlpha : Float,
)
```- Main Features
- Everything done in Compile time.
- Supports Kapt and KSP processors.
- Supports List, Recycler and Array Adapters.
- Supports Paging2 and Paging3 Adapters.
- Supports Expandable List Adapter.
- Supports image loading with Picasso, Glide and Coil.
- Supports generating DiffUtil ItemCallback.
- Supports generating refresh data method for RecyclerAdapter.
- Supports generating listeners.
- Supports type checking when using annotation with invalid data type.
- Supports default and custom name for the generated Adapter class.
- Show clear warns and errors.- Documentations:
- [Full Documentation](https://amrdeveloper.github.io/EasyAdapter/)
- [Install](docs/install.md)
- [How to use](docs/how_to_use.md)
- [Adapters Annotations](docs/annotations/adapters.md)
- [Binds Annotations](docs/annotations/binds.md)
- [Listeners Annotation](docs/annotations/listeners.md)- Documentations for Contributors:
- [Support New Adapter](docs/contribution/support_new_adapter.md)
- [Support New Binds](docs/contribution/support_new_bind.md)
- [Support New Listener](docs/contribution/support_new_listener.md)
- [Contribute in Docs](docs/contribution/documentation.md)### License
```
MIT LicenseCopyright (c) 2021 Amr Hesham
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```