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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Nancy Melucci](https://uploads.teamtreehouse.com/production/profile-photos/944942/micro_0000goodview.jpg)
Nancy Melucci
Courses Plus Student 36,045 PointsCould Fun Facts be modified to also add images and have them change?
I know changing images is probably handled more deftly by something like Nav Drawer. But I modified the text part of Fun Facts to be related to Astronomy and I was wondering if I could design another class, structured as an analog to the ColorWheel class, and have different cool pictures of stars, planets and other astronomical objects.
If so, would the array of pictures be based on string like the Fact Book or Int/IntAsString like the ColorWheel class?
If this is ill-advised or will otherwise break the progam, would it be possible to add one stationary picture to the view that includes the stationary text "Did you know?"
If I do start messing around with this, I am going to save it in a zip file or apk before I start. I have written it twice - once as narrated by Ben J. and yesterday as narrated by Ben D.
I thought it might be fun to kick it up a notch.
Happy New Year everyone.
Nancy M.
2 Answers
![Seth Kroger](https://secure.gravatar.com/avatar/b5bdc43c1e576145fb404edba6fea5a6?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Seth Kroger
56,413 PointsYes, that's certainly possible to do. First you would need to put the images in res/drawable, preferably in res/drawable-*dpi scaled to each resolution. (The Interactive Story App course shows you how to work with images/drawables if you haven't taken it yet.) The array in this case would be an array of ints (ie, int[]) where each int is an R.drawable.yourimagename. Then you would pass the chosen int to setBackground() instead of setBackgroundColor().
![Nancy Melucci](https://uploads.teamtreehouse.com/production/profile-photos/944942/micro_0000goodview.jpg)
Nancy Melucci
Courses Plus Student 36,045 PointsThank you. I did the Interactive Story App last summer but it developed a weird sync issue at the very end - so I may write it again. I will save my Fun Facts version and try out the images, but probably after I finish the Lists and Adapters course. Thanks for taking the time to answer my question. I look forward to experimenting with making Fun Facts even "funner".
Nancy