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

Android Build a Simple Android App (2014) Creating the Screen Layout Changing Text in a Layout

mazhar salam
mazhar salam
126 Points

i changed the part of android:text="i love treehouse" to android:text="treehouse loves me" and it isnt working.

should i change something else?plus i have no knowledge about xml whatsoever than that i have learned till now from treehouse. should i have to learn it from some other way or will i learn through this course?

activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent" >

  <TextView
    android:text="treehouse loves me!"
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:textSize="16sp" />

</RelativeLayout>

3 Answers

Is this a question from one of the practice quizzes or just following along with the instructor? Because if it is a practice quiz then maybe the fact that you added an "!" at the end of "treehouse loves me" doesn't exactly match up to the text they expected. And for your XML q, I am going through the same dilemma, also being a beginner, and I think that XML is a learn as you go kind of language that you'll just pick as you watch more tutorials and write more code. Hope this helps!

mazhar salam
mazhar salam
126 Points

it is a practice question . i removed "!" and it isnt still working.

mazhar salam
mazhar salam
126 Points

it is a practice question . i removed "!" and it isnt still working.

I think I found your problem, your "t" in "treehouse loves me" is lowercase, and their instructions say, "Treehouse loves me". let me know if this works.