Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
The line should now be as such:
Drawable drawable = ContextCompat.getDrawable(this, mCurrentWeather.getIconId()); mIconImageView.setImageDrawable(drawable);
mods can you add this to the teachers notes? source https://developer.android.com/reference/android/support/v4/content/ContextCompat.html http://stackoverflow.com/questions/29041027/android-getresources-getdrawable-deprecated-api-22
Here is the solution:
Drawable drawable = ResourcesCompat.getDrawable(getResources(), mCurrentWeather.getIconID(), null); mIconImageView.setImageDrawable(drawable);