Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Josh Myers
Josh Myers
3,203 Points

Setting Color Activity

I'm unable to complete the second part of the exercise. It tells me to change the background of the layout to dark pink (#fff092b0). I copy and paste the hex color code into the "android:background="@android:color/white" >" line and it keeps telling me that it is incorrect. What should I do?

2 Answers

Hi, changing the color of a backround (xml) to dark pink (#fff092b0) will look like this: android:background="#fff092b0";

using "@android:color/" will give you saved system colors.

This line of xml:

android:background="@android:color/white -> will set the color to be what defined as white.

So you mush put the color code inside "", and make sure you have a # before it (also inside the "").


android:background="@android:color/_pre_defined_colors(by android)"

Dan Someone
Dan Someone
1,320 Points

Thank you for this answer. It actually was not clear in the video that the @android:color portion needed to be removed to allow the hex.