0
I tried it like this but it’s returning 0
try {
String nome_foto = itens.get(position).nome_foto;
int drawableId = context.getResources().getIdentifier(nome_foto, "drawable", context.getPackageName());
Log.e("",""+drawableId+" "+R.drawable.bertioga1+" "+nome_foto);
imagem.setImageResource(drawableId );
}
What is the content of
nome_foto
?– André Ribeiro
the name of the photo in the drawable , type foto1
– Ilgner de Oliveira