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:
publicvoidonBindViewHolder(MyViewHolder holder, int position) {
Contextctx= holder.itemView.getContext();
Viewview= 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"