Reputation: 21
I'm working on small app in kotlin for android and i used sql to make a small pre-populated database of books which i then load into a room database. I want to store the images of the books inside the database and initially i tried using the id from R.drawable:name_book but i found out it doesn't work, so what else can i do? (i keep the drawables in the drawable-nodpi folder while the .png are in another folder still in the project).
I tried searching around for some answers but i mainly found solutions for storing the drawables from in memory. The best one i found is to use an enum to bind the id of the drawable with the title of the book in the database but this would require an enum with like 30-40 words so i was wondering if there wasn't a simpler solution.
Upvotes: -1
Views: 44