Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Pieter-Andries van der Berg
Pieter-Andries van der Berg
7,468 Points

Android List of Images

Hello all,

can you guys provide me a good way how you would create some sort of gallery.

Like a list of images from a folder of your phone lets say the pictures folder.

I scoured the web but cannot find a good way all deprecated ways or way too complicated.

( maybe something with recyclerview etc.)

4 Answers

alastair cooper
alastair cooper
30,617 Points

Hi

A recycler view is a good way to display gallery. See the 'picasso' API for making loading the images a lot less complicated than the native Android way. And there are loads of great tutorials for it too (Although as a teacher I am bound to suggest that working through the more complicated ways you find online will provide you with a better learning experience in the end.)

Hope this helps

Pieter-Andries van der Berg
Pieter-Andries van der Berg
7,468 Points

Can you point me towards some ways / guides / tutorials?

alastair cooper
alastair cooper
30,617 Points

Here is one I followed with Picasso API a long time ago. https://code.tutsplus.com/tutorials/code-an-image-gallery-android-app-with-picasso--cms-30966

This is a good basic starter one that uses Glide API. It helps you create and leaves you with a basic template that you can build on in your other projects https://javapapers.com/android/android-image-gallery-example-app-using-glide-library/

hope these help get you started