I’m trying to show all images from a selected category on screen. Which is the best way to accomplish this? because the drawable folder won’t allow me to create subfolders 🙁
i will be using a database but i don’t want to save the whole image in it, can this be done?
Thanks in advance
I’m trying to show all images from a selected category on screen. Which is
Share
You could use the database to store the resource name of each image associated with its category.
When you want to display all images from a particular category, you can
SELECT resourceName FROM images WHERE category = 'plants'. Then iterate over the returned cursor, using the resource name (which is the ID of the drawable) to load from the drawable folder as you would normally.