0
I would like to know how to take an image id from the drawable folder and use it in an Imageview. I am trying to do this within a Listview
String nomeImgFilme = filme.getImagem();
int imgID = convertView.getResources().getIdentifier(nomeImgFilme, "drawable", context.getPackageName());
I’m trying to run this code, but it gives error :
"Resources$Notfoundexception: Resource ID #0x7f060054".
And if I put the image directly with "R.drawable.circulo_fogo", it also says that it was not found.
So how do I get the id of an image by name inside a Listview?