I want to display all the photos from my phone and display them in a gridview using Picasso. The problem is that I do not know how to implement this.
I am currently using this to request all photos of the phone:
Cursor cursor; String[] columns = new String[] { MediaStore.Images.ImageColumns._ID, MediaStore.Images.ImageColumns.TITLE, MediaStore.Images.ImageColumns.DATA}; cursor = cr.query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, columns, null, null, null); int columnIndex = cursor.getColumnIndex(MediaStore.Images.Thumbnails._ID); int columnPath = cursor.getColumnIndex(MediaStore.Images.Thumbnails.DATA);
And MediaStore.Images.Thumbnails.getThumbnail to get a bitmap thumbnail for injection into ImageView.
How can I implement it using Picasso?
source share