Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

set source image in android studio

ImageView myImageView;
myImageView = mDialog.findViewById(R.id.image_id);
String src = "imageFileName"

int drawableId = this.getResources().getIdentifier(src, "drawable", context.getPackageName())
popupImageView.setImageResource(drawableId);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #source #image #android #studio
ADD COMMENT
Topic
Name
6+1 =