DSpotDevelopers / declex

DecleX - Declarative Framework for Android, easier and faster coding.
Other
168 stars 25 forks source link

Implement multiple view supports for AdapterViews and RecyclerViews using AdapterDelegates #243

Open smaugho opened 6 years ago

smaugho commented 6 years ago

AdapterDelegates https://github.com/sockeqwe/AdapterDelegates is an amazing approach to reduce the BoilerPlate related with Adapters, and to support different type of views depending of different Models. It would be great if Declex could support on its Lists to this library, to support multiple models, for instance:

@Populate
List<Object> someObjectList = new LinkedList();

@AfterViews
void afterCreate() {
   someObjectList.add(new Cat());
   someObjectList.add(new Mouse());
   .....
}

So the list could have different classes, the layout should specify somehow which layouts are supported, and DecleX should "inject" which layout to use with which model.