Introduction
Some views in PlaceHolderView library is build on top of RecyclerView and other are written in its own.
All the annotations are processed during build time to generate the binding classes
There are two versions available for use.
- Old version (branch 1.x): Uses Java reflection
- New version (branch 2.x): Uses Annotation Processing.
How To Use New Version(2.x) with annotation processing:
Note: If you are using Kotlin then refer to Kotlin doc.
Gradle dependency:
dependencies {
...
compile 'com.mindorks.android:placeholderview:1.0.3'
annotationProcessor 'com.mindorks.android:placeholderview-compiler:1.0.3'
// RecyclerView dependency is added to override the
// default 25.4.1 RecyclerView dependency used by placeholderview.
// If you are using the support libraries other than 25.x in the project
compile 'com.android.support:recyclerview-v7:<current-version>' // example: 27.1.0
}
To migrate from 1.x to 2.x see Migration.
This library provides 5 different type of views
PlaceHolderView
It is build on top of RecyclerView and abstracts most of the boiler plate. It provides APIs through annotations.InfinitePlaceHolderView
It is build on PlaceHolderView and adds the functionality of handling load more views when the user has scrolled to the bottom of the list.ExpandablePlaceHolderView
It is build on PlaceHolderView and creates ExpandableListView with parent-child relation.SwipePlaceHolderView
It is not build on RecyclerView. Its a ground up implementation. We can create a variety of card stack views using this class. It provides APIs that could easily build Tinder like cards.SwipeDirectionalView
It is build on top of SwipePlaceHolderView. It provides callbacks for swipe directions and touch events.