I have a question. I know I can store an image as byte array in SQLite database. But this needs some extra CPU work, so I tried to store only the id (R.drawable.myImage
).
I stored it as an integer and I can retrieve it back. I am setting my image into imageview like this:
ivSportIcon.setImageResource(getItem(i).getIcon());
But I get an error:
Resources$NotFoundException: Resource ID #0x8
Is this a wrong way? Should I store my image as a byte array? Thank you in advance!