Skip to content Skip to sidebar Skip to footer

Items Overlapping In Recycler View

The Items in my recycler view are overlapping when user scrolls. Notice the overlapping text at the bottom: Here is the code generating this view: ArrayList

Solution 1:

Problem Solved:

 public void onBindViewHolder(MyViewHolder holder, int position) {
    Context ctx = holder.itemView.getContext();
    View view = getViewForCard(ctx, position);      // getView for the card

    holder.viewGroup.removeAllViews();     // **The problem solved here**

    holder.viewGroup.addView(view);
}

I removed all views from the holder.viewGroup in the onBindViewHolder() method within MyRecyclerAdapter class. And there is no more overlapping :).


Post a Comment for "Items Overlapping In Recycler View"