android set image src in imageview

www.l‮uttua‬ri.com
android set image src in imageview
String src = "imageFileName"

int drawableId = this.getResources().getIdentifier(src, "drawable", context.getPackageName());
ImageView myImageView = mDialog.findViewById(R.id.image_id);
myImageView.setImageResource(drawableId);
Created Time:2017-10-08 22:05:12  Author:lautturi