Ashley
Ashley

Reputation: 225

List and select images in specific folder in external storage - android

I want to add this feature in my app where I allow the users to view all the images in a specific folder in my external storage (folder is "/Wardrobe/").

The user should be able to pick 3 images which I will then set their selections into an imageView on a different screen. I have the screen already set up with three imageViews.

I have read a few questions asking similar questions but none seem to give me the answer I need.

Not sure if it is possible, but can I have my images display the way the images show when you view the gallery but without creating a gridview?

Any ideas on how to get started?

Upvotes: 0

Views: 249

Answers (1)

hiimcg
hiimcg

Reputation: 121

Although not recommended, you may be about to utilize SharedPreferences within Android to store images. I'm trying to understand the concept of your application, but to get you started with some kind of code to store the images:

 SharedPreferences shpr = PreferenceManager.getDefaultSharedPreferences(this);
 Editor edit=shpr.edit();
 edit.putString("path","/sdcard/Wardrobe/clothes.jpeg");
 edit.commit();

This might allow you to create some type of folder to share. Otherwise, SQLite may offer another option.

Upvotes: 1

Related Questions