Android RecyclerView wrong view adding when scroll
<p>I am using SliderLayout for my items.</p>

<p>This my code for adding images to SliderLayout:</p>

<pre><code>final ModelTimeline data = timelineList.get(position);

... other case...

        case TYPE_ATTACHMENTS:
final TimeLineHolderAttachments holder_attachments = (TimeLineHolderAttachments) viewHolder;
                        ....
                        List&lt;String&gt; list_all = data.getAttachments();

                        if (list_all.size() &gt; 0) {
                            for (final String url : list_all) {


                TextSliderView textSliderView = new TextSliderView(mContext);
                            textSliderView
                                    .image(url)
                                    .setScaleType(BaseSliderView.ScaleType.CenterCrop)
                                    .setOnSliderClickListener(new BaseSliderView.OnSliderClickListener() {
                                        @Override
                                        public void onSliderClick(BaseSliderView slider) {
                                            Intent imageViewer = new Intent(mContext, ImageViewer.class);
                                            imageViewer.putExtra("image_url", url);
                                            if (android.os.Build.VERSION.SDK_INT &gt;= android.os.Build.VERSION_CODES.LOLLIPOP) {
                                                ActivityOptions options = ActivityOptions
                                                        .makeSceneTransitionAnimation(((Activity) mContext), holder_attachments.mDemoSlider, "imageviewer");
                                                mContext.startActivity(imageViewer, options.toBundle());
                                            } else {
                                                mContext.startActivity(imageViewer);
                                            }
                                        }
                                    });

                            holder_all.mDemoSlider.addSlider(textSliderView);
                        }
                        holder_all.mDemoSlider.stopAutoCycle();
                    } else {
                        holder_all.mDemoSlider.removeAllSliders();
                    }
                    ...
                    break;
    ...
</code></pre>

<p>And when I scroll my RecyclerView in this SliderLayout, it is adding the wrong images, from other items. How can I fix this?</p>