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 trialMUZ140881 Munyaradzi Dhodho
1,326 PointsI tried your suggestion admerson its still is not working
Check what I did and advise
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Treehouse loves me!"
android:textSize="72sp" />
android:textColor="@android:color/white" >
</RelativeLayout>
5 Answers
Daniel Hartin
18,106 PointsNot sure what the original question was but I think in your code you have put the closing tag a line too early try the code below.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Treehouse loves me!"
android:textSize="72sp"
android:background="@android:color/white"/>
</RelativeLayout>
MUZ140881 Munyaradzi Dhodho
1,326 PointsDaniel seems the code you are giving is similar to what I did or am missing something
Daniel Hartin
18,106 PointsYes it is very similar there is only one subtle difference, if you look at the last two lines of your code you will see the closing tag is blanking the line out which defines the background colour of the textview. I simply moved this onto the last line which is where I think it should be however your question doesn't state what your original problem was so let me know if it is something further.
Hope it helps Daniel
Abdiaziz Abdullahi Abdulle
Full Stack JavaScript Techdegree Student 7,458 Points android:textColor = "@android:color/black" ```
add that in the <TextView attribute.
MUZ140918 Frank Thabo
3,839 PointsMunya , did you work it out , if yes , can you tell me how you got around it . am stuck
Abdiaziz Abdullahi Abdulle
Full Stack JavaScript Techdegree Student 7,458 Pointshey, post the question.
MUZ140881 Munyaradzi Dhodho
1,326 PointsI did and it worked out
MUZ140881 Munyaradzi Dhodho
1,326 PointsFrank what challenge are you facing you can post it on the forum