What is the purpose of setImageResource in Android

0 votes
What does the setImageResource() method in Java code do if an image is already defined in XML and appears without issue on the emulator screen when the app is run?
Nov 7 in Android by Edureka
• 10,880 points
55 views

1 answer to this question.

0 votes

setImageResource(): Use a resource id to set the content of the ImageView. setImageUri(): Use a URI to set the content of the ImageView.

answered Nov 8 by Edureka
• 12,390 points

Related Questions In Android

0 votes
0 answers

What are the differences between C, C# and C++ in terms of real-world applications?

As I stated in an earlier article, ...READ MORE

Sep 20 in Android by Edureka
• 12,390 points
42 views
0 votes
0 answers

What is an Intent in Android?

I have a few questions related to ...READ MORE

Nov 9 in Android by Edureka
• 10,880 points
25 views
0 votes
0 answers

How purple 200/500/700 define in the color.xml of a new Android Project?

A new Android project provides a set ...READ MORE

Nov 23 in Android by Ashwini
• 2,760 points
22 views
0 votes
0 answers

What is an activity, a context and an intent in Android?

Could someone kindly explain to me what ...READ MORE

Nov 23 in Android by Edureka
• 12,390 points
16 views
0 votes
1 answer

Running docker on Android

According to the documentation, the Android kernel is ...READ MORE

answered Aug 1, 2018 in Docker by Kalgi
• 52,350 points
3,028 views
0 votes
1 answer

Task Canceled Exception while invoking AWS Lambda

I'm guessing either the TaskCanceledException instance is ...READ MORE

answered Sep 19, 2018 in AWS by Priyaj
• 58,100 points
1,661 views
0 votes
1 answer

Is there a way to run Python on Android?

YES! An example via Matt Cutts via SL4A -- "here’s ...READ MORE

answered Sep 19, 2018 in Python by Priyaj
• 58,100 points
471 views
0 votes
1 answer

How can we get the current location in Android?

First you need to define a LocationListener to handle ...READ MORE

answered Sep 25, 2018 in Java by Parth
• 4,630 points
426 views
0 votes
1 answer

What are intent-filters in Android?

Just for the record. This is how ...READ MORE

answered Nov 15 in Android by Edureka
• 12,390 points
34 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP