Huseyin Baduk Huseyin Baduk - 7 months ago 50
Android Question

Android - Recyclerview adapter show Images from External Storage

I want create image gallery with RecyclerView where use images from phone. I didn't find any RecyclerView adapter which fill image with File type. Is it possible?


For basic functionality of RecyclerView adapters:

In your onBindViewHolder, you can get your image like this:

String path = Environment.getExternalStorageDirectory() + "/myImage.jpg";
Bitmap bitmap = BitmapFactory.decodeFile(path);

(more info on getting images from external storage)

and use it with an ImageView or something similar.