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

Joe Champion
Joe Champion
946 Points

In Android track, the Interactive Story nameEditText has stopped displaying "Enter Your Name to Begin"?

I was building this app with no problems. Then after I added the storyImageView, storyTextView, and two choiceButtons

tothe activity_story.xml( which all display as shown by the instructor Ben), now when I start the app, the "Enter your name to begin" hint does not display on the emulator (it did before)Here is the activity_main.xml file:

RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"

tools:context=".MainActivity"
android:background="@android:color/white">

<ImageView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/titleImageView"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:src="@drawable/main_title"
    android:scaleType="fitXY"
    android:adjustViewBounds="true"
    android:contentDescription="Signals from Mars"/>

<Button
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="START YOUR ADVENTURE"
    android:id="@+id/startButton"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:background="@android:color/white"
    android:textColor="#FF3A8AEC"/>

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:inputType="textPersonName"
    android:ems="10"
    android:id="@+id/nameEditText"
    android:layout_above="@+id/startButton"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:hint="Enter your name to begin"
    android:maxLength="30" />

</RelativeLayout>

Thanks.