lucasr / smoothie

[DEPRECATED] Easy async loading for Android's ListView/GridView
985 stars 163 forks source link

Removing android.widget.Adapter dependency from ItemLoader #26

Open mr-archano opened 10 years ago

mr-archano commented 10 years ago

Using generics in the ItemLoader is possible to avoid the dependency from android.widget.Adapter and ease future generalisations that can use other type of adapters/target views (eg: RecyclerView). This has been possible because ItemLoader does not rely on any android.widget.Adapter behaviour, but uses that type only in the signature of some of its business methods.

lucasr commented 10 years ago

Thanks @mr-archano! This is looking good after quick skim. I'll do more thorough review later today or tomorrow.

mr-archano commented 10 years ago

I have worked on a quick&dirty port of Smoothie that is working with the RecyclerView (mostly a copy/paste of the ItemManager and ItemManaged classes), but the change in this PR was needed in order to preserve the Smoothie API (the user only knows about ItemLoader). It would be cool to hear from you about the Smoothie 1.0 API, I would be happy to contribute :)