A wrapper for android recyclerview and contains stacked view


Download Mindorks Open Source Love License

Simple, Easy and Superfast dynamic view creation with Awesome animations prebuilt!

Few Implementations

STEP 1: Define a PlaceHolderView inside XML layout

//PlaceHolderView to wrap around the recycler view in XML

STEP 2: Create item views XML, example: gallery_item_big.xml

<LinearLayout xmlns:android=""

STEP 3: Create item class to bind and define view operations

public class ImageTypeBig {

    private ImageView imageView;

    private String mUlr;
    private Context mContext;
    private PlaceHolderView mPlaceHolderView;

    public ImageTypeBig(Context context, PlaceHolderView placeHolderView, String ulr) {
        mContext = context;
        mPlaceHolderView = placeHolderView;
        mUlr = ulr;

    private void onResolved() {

    private void onLongClick(){


STEP 4 : Add views to the PlaceHolderView

 PlaceHolderView mGalleryView = (PlaceHolderView)findViewById(;

// (Optional): If customisation is Required then use Builder with the PlaceHolderView
// placeHolderView.getBuilder()
//      .setHasFixedSize(false)
//      .setItemViewCacheSize(10)
//      .setLayoutManager(new GridLayoutManager(this, 3));

        .addView(new ImageTypeBig(this.getApplicationContext(), mGalleryView, url1));
        .addView(new ImageTypeBig(this.getApplicationContext(), mGalleryView, url2));
        .addView(new ImageTypeBig(this.getApplicationContext(), mGalleryView, url3));
        .addView(new ImageTypeBig(this.getApplicationContext(), mGalleryView, url4));

That's All! Cheers! :beer:

Classes OverView


  1. getBuilder(): Get builder for the PlaceHolderView to modify the default properties
  2. setLayoutManager(layoutManager): Add custom layout manager
  3. addView(): Add views to the PlaceHolderView
  4. removeView(): Removes the existing view
  5. SmoothLinearLayoutManager: This class is bundled with the library, and should be used for those view which has dynamic heavy contents. It reduces the screen flickering on bind


  1. @Layout: Bind the XML layout with the class.
  2. @View: Bind the variable with the view defined in the above layout.
  3. @Click: Bind the OnClickListener to a view.
  4. @LongClick: Bind the long click listener to a view.
  5. @Resolve: Any operation being performed on the view reference defined by @View should be annotated with this.
  6. @Animate(Animation.ENTER_LEFT_DESC): Sets the defined animations in the Animation class on this item view.
  7. @NonReusable: Releases the view reference along with all the attached references in the view object. This view object should not be used again in the addView().
  8. @Position: This annotation binds an int variable to the position of the item view after the item view is attached to the display.


  1. PlaceHolderView will recycle the viewItems and will try to use similar/same viewtype viewItem to populate the data of the current viewItem. So, the method annotated with @Resolve will be called everytime the viewItem is attached to the window. Meaning if you don't explicitly manage to populate the viewItem in method annotated with @Resolve then that viewItem may show history of the reused viewItem.
  2. Try to instantiate any class in the constructor rather than method annotated with @Resolve.
  3. If the itemView contains PlaceHolderView/ListViews and item are being adding through method annotated with @Resolve, then first make the list empty. This is required because duplicate viewitems may get added if the recycled view contains PlaceHolderView/ListViews of other itemView. For PlaceHolderView: call removeAllViews() before adding views in method annotated with @Resolve.


This class is build upon the PlaceHolderView and implements all the features of ExpandableListView but with much power and lot easier


  1. @Parent: Defines the class to be used as the parent in the expandable list.
  2. @SingleTop: Makes only one parent remain in expanded state.
  3. @Collapse: Bind a method of the parent class to listen to the collapse event.
  4. @Expand: Bind a method of the parent class to listen to the Expand event.
  5. @ParentPosition: Bind an int variable to update with relative position among parents.
  6. @ChildPosition: Bind an int variable to update with relative position among children of a parent.
  7. @Toggle: Bind a view to be used as a trigger for expanding or collapsing a parent view. If not provided then the parent view becomes a toggle by default.

There is no adapter configuration required


This class is bundled with view that can create beautiful card stacks like Tinder, LinkdIn and Card Games. This class provides methods to customize the behavior of the stack, gesture inputs and animations.


This class contains view behaviour settings and animation controls for SwipePlaceHolderView.


The stack structure and type configurations are done using builder class


  1. @SwipeIn: It binds a method and calls it when a view is swiped in/accepted
  2. @SwipeOut: It binds a method and calls it when a view is swiped out/rejected.
  3. @SwipeCancelState: It binds a method and calls it when a card is put back in the stack/canceled.
  4. @SwipeInState: It binds a method and pings it till a card is moving in the direction of swiping in/accepted
  5. @SwipeOutState: It binds a method and pings it till a card is moving in the direction of swiping out/rejected
  6. @SwipeView: It binds the android.view.View reference to the tinder view


This class provides a mechanism to load the data in bunches for infinite loading. If the scroll reaches the last item, it calls for LoadMore and show the defined loadmore indicator view. When new data it added the indication is removed. To get the callback for loadmore create a class like that used in PlaceHolderView and define a method with @LoadMore annotation. This method should be used to do network calls and to add new fetched views.


  1. setLoadMoreResolver(T loadMoreResolver): This method is used to add a class to be used as indicator for load more. The class can define a view with a progessbar to reflect loading. The class has to be defined in the same way as a class that is used in the PlaceHolderView. See above for PlaceHolderView example.
  2. loadingDone(): After the view has beed added from the new fetch, call this method to remove the loading indicator view.
  3. noMoreToLoad(): When all the data has been fetched, call this method to stop the infinite loading.


  1. @LoadMore: This annotation calls a method of the class provided in setLoadMoreResolver with callback when load more is required, i.e. when last item has been seen.
The Full Documentation is in the process of writing. For any query post it in the discussion or [email protected]


dependencies {
    compile 'com.mindorks:placeholderview:0.6.1'

Dependency: It depends on the RecyclerView

Proguard Note:

If you are using proguard, then add this rule in proguard-project.txt

  -keepattributes *Annotation*
  -keepclassmembers class ** {
    @com.mindorks.placeholderview.annotations.** <methods>;

If this library helps you in anyway, show your love :heart: by putting a :star: on this project :v:


Android Navigation Drawer

Android Beginner Image Gallery

Android Advance Image Gallery

Android Expandable News Feed

Android Tinder Swipe

Android Infinite List with Load More

Recent Library: JPost

JPost is a pubsub library based on massages over a channel. It's very efficient and much powerful than other pubsub libraries. It prevents memory leak and increases code control. Also, provide a mechanism to run code asynchronously.


   Copyright (C) 2016 Janishar Ali Anwar

   You may obtain a copy of the License at

   Unless required by applicable law or agreed to in writing, software
   See the License for the specific language governing permissions and
   limitations under the License

Related Repositories



This repository contains a detailed sample app that implements MVP architecture ...



Placeholder views based on content, loading, error or empty states ...



KiteKit for iOS and Mac ...



Java and Android class communication library: New and improved Pub-Sub ...



This repository contains a detailed sample app that implements MVVM architecture ...

Top Contributors

janishar amitshekhariitbhu bloderxd JTBrinkmann passsy


-   0.6.2 zip tar
-   0.6.1 zip tar
-   0.6.0 zip tar
-   0.5.2 zip tar
-   0.5.1 zip tar
-   0.5.0 zip tar
-   0.2.9 zip tar
-   0.2.8 zip tar
-   0.2.7 zip tar
-   0.2.6 zip tar
-   0.2.5 zip tar
-   0.2.4 zip tar
-   0.2.1 zip tar
-   0.1.6 zip tar
-   0.1.5 zip tar
-   0.1.4 zip tar
-   0.1.3 zip tar