show images from internal storage in Recyclerview
<p>I'm saving images from camera and gallery(multi-select) to a folder in internal storage. I want to display those images in horizontal Recyclerview. In the row layout, there is a close button along with imageview. I want to delete the image(File) from internal storage when the close button is clicked. I've 2 problems:
<strong>Problem 1:</strong> When I select images(single or multiple) from gallery, the images are saving correctly but in Recyclerview, the image from gallery is shown in all position i.e. if there are 2 images in the folder and I select 1 image from gallery, then in Recyclerview all 3 positions will have the image from gallery only. 
<strong>Problem 2:</strong> How to delete images from folder when close button is clicked?</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>//Recyclerview Adapter
public class RecycleImageAdapter extends RecyclerView.Adapter&lt;RecycleImageAdapter.ViewHolder&gt; {

    private List&lt;String&gt; itemList;
    private Context mContext;

    public RecycleImageAdapter(Context context, List&lt;String&gt; itemList) {
        this.itemList = itemList;
        this.mContext = context;
    }

    @Override
    public RecycleImageAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.imagelayout, parent, false);
        return new RecycleImageAdapter.ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(final RecycleImageAdapter.ViewHolder holder, int position) {
        for (int i= 0; i &lt; itemList.size(); i++) {
            Uri uri = Uri.parse(itemList.get(i));
            holder.setImageView(uri);


        }

    }

    @Override
    public int getItemCount() {
        return this.itemList.size();
    }

    class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{

        ImageView image, delbtn;

        ViewHolder(View itemView) {
            super(itemView);
            image = (ImageView) itemView.findViewById(R.id.img_thumbnail);
            delbtn = (ImageView)itemView.findViewById(R.id.del);
            delbtn.setOnClickListener(this);
        }

        public void setImageView(Uri uri){
            Picasso.with(mContext).load(uri).into(new Target() {
                @Override
                public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
                    image.setImageBitmap(bitmap);
                }

                @Override
                public void onBitmapFailed(Drawable errorDrawable) {
                    Log.e("sammy_error"," "+errorDrawable);
                }

                @Override
                public void onPrepareLoad(Drawable placeHolderDrawable) {

                }
            });
        }

        @Override
        public void onClick(View view) {
            int position = getAdapterPosition();
            Toast.makeText(mContext, itemList.get(position), Toast.LENGTH_SHORT).show();
            itemList.remove(position);
            notifyItemRemoved(position);
            notifyItemRangeChanged(position, itemList.size());

   //Here I'm getting ArrayIndexOutOfBoundsException
            File file = new File(itemList.get(position));
            file.delete();
        }
    }
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>//in Fragment, code to load images

File directory = new File(file_path);
        File newfile[] = directory.listFiles();
        //finalImages is ArrayList&lt;String&gt;  
        if(finalImages!=null )finalImages.clear();

        for (int i= 0; i &lt; newfile.length; i++) {
            String path = "file://"+newfile[i].getAbsolutePath();
            finalImages.add(path);
        }

        recyladapter.notifyDataSetChanged();</code></pre>
</div>
</div>
</p>