Search
 
SCRIPT & CODE EXAMPLE
 

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);
Comment

PREVIOUS NEXT
Code Example
Java :: abs in java 
Java :: java enum length 
Java :: java get file name without extension 
Java :: Java Read a Line of Text Using Scanner 
Java :: get thumbnail from video in android 
Java :: connect sqlite for java 
Java :: find maximum in array java 
Java :: check if list includes value java 
Java :: string to int 
Java :: param query spring boot 
Java :: binary to decimal in java program 
Java :: list of numbers java 
Java :: statusbar text color android 
Java :: java how to define a function 
Java :: java get number of months between two dates 
Java :: android studio change button color programmatically 
Java :: java logger with different colors 
Java :: upper en java 
Java :: polymorphism in oop 
Java :: sort comparator in java 
Java :: loop through java object 
Java :: java toggle button get state 
Java :: distance point to line java 
Java :: how to make a dictionary in java 
Java :: json array get json object 
Java :: arraylist to string 
Java :: how to subtract localdatetime in java 
Java :: writing values in 2d array java 
Java :: current time stamp android java 
Java :: java actionperformed 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =