This course will be retired on July 14, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
The Dark Sky service returns a string value representing the current weather icon. We need to customize our data model to convert this string representation into an icon provided by our designer.
Project Resources
Case Statements
case "rain":
iconId = R.drawable.rain;
break;
case "snow":
iconId = R.drawable.snow;
break;
case "sleet":
iconId = R.drawable.sleet;
break;
case "wind":
iconId = R.drawable.wind;
break;
case "fog":
iconId = R.drawable.fog;
break;
case "cloudy":
iconId = R.drawable.cloudy;
break;
case "partly-cloudy-day":
iconId = R.drawable.partly_cloudy;
break;
case "partly-cloudy-night":
iconId = R.drawable.cloudy_night;
break;
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
PLUS
Sharina V Jones
Courses Plus Student 1,847 Points0 Answers
-
Christopher Steitz
29,749 Points1 Answer
-
dodders
Python Development Techdegree Graduate 38,680 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up