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.

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.