CopyPastor

Detecting plagiarism made easy.

Score: 0.7692458629608154; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2016-03-08
by Nirav Ranpara

Original Post

Original - Posted on 2012-07-31
by rfsbraz



            
Present in both answers; Present only in the new answer; Present only in the old answer;

you can do by uri
String uri = "@drawable/imname"; //imname without extension int imageResource = getResources().getIdentifier(uri, null, getPackageName()); //get image resource Drawable res = getResources().getDrawable(imageResource); // convert into drawble imageView.setImageDrawable(res); // set as image
Try this:
String uri = "@drawable/myresource"; // where myresource (without the extension) is the file
int imageResource = getResources().getIdentifier(uri, null, getPackageName()); imageview= (ImageView)findViewById(R.id.imageView); Drawable res = getResources().getDrawable(imageResource); imageView.setImageDrawable(res);

        
Present in both answers; Present only in the new answer; Present only in the old answer;