Я сохраняю свои связанные с проектом изображения в папке с возможностью выбора. Также я сохраняю имена изображений в строковой переменной и динамически пытаюсь установить эти изображения в образ. Но изображение не отображается. Пожалуйста, помогите мне в этом.
Мой код:
int res = getResources().getIdentifier(imagename, "drawable", this.getPackageName());
imageview= (ImageView)findViewById(R.id.imageView);
imageview.setImageResource(res);
В приведенном выше коде "imagename" - это строковая переменная, которая содержит имя изображения.
Заранее спасибо