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! While you're at it, check out some resources Treehouse students have shared here.
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
Nathan Beauchamp
2,456 PointsEasier way to set the Icon Image.
Before moving to this video, I wrote the code to set my mIconImageView, but mine was a little bit different. When I seen that the mIconView.setImageDrawable() needed a Drawable item, instead of creating the new item, I looked at the other methods available. I found this: mIconImageView.setImageResource(mCurrentWeather.getIconId()); It lets me change the id directly, so I'm able to use the value that is stored in mCurrentWeather without creating a Drawable.
To test and make sure that it is working correctly, I changed the GPS coordinates to my location, both the icon and summary changed to match my location.