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 trialHarry Botonakis
Courses Plus Student 337 PointsThe question with changing the Relative LAyout to dark pink wont work and I cant finish stage 2 ,cause of the code.
I have tried to change the color in the code.The color is supposed to be #ff56789 or somethin , so what can we do to change the color in code, at the whole Layout?
3 Answers
Stone Preston
42,016 Pointsthe relativeLayout already has a background attribute, so all you need to do is change the color thats between the quotes. currently it looks like this:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white" >
to change the background color to a different color just change the value that comes after android:background=
so since we need to make the color #fff092b0
we can simply remove whats currently in the quotes and replace it with #fff092b0
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff092b0" >
Harry Botonakis
Courses Plus Student 337 Pointsthanks a million my friend Peter
Harry Botonakis
Courses Plus Student 337 PointsI think its easy/common sense wise, I tried it and it wouldnt do anything so I can finish stage 2.
Stone Preston
42,016 PointsStone Preston
42,016 Pointspost the code you have tried so far please