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 Adding a Button

Emulator not reflecting work, tried clean & rebuild, restarted emulator.

I've done everything to this point, but the emulator is only showing the ;Dud you know' at the top of the Fun Facts app. I've tried using Clean and Rebuild options--I even restarted the emulator twice. Any idea why this is happening? I could probably move on but I suspect this could be an issue in the future. Any help is appreciated.

What does your layout file have in it?

I added the XML below as an answer .... there wasn't an option to reply directly. Thx in advance.

1 Answer

Hi, I am assuming you mean the XML here. it is below.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".FunFactsActivity" android:id="@+id/">

<TextView
    android:text="Did you know?"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/textView2"
    android:textSize="24sp" />

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Ants stretch when they wake up in the morning."
    android:id="@+id/factTextView"
    android:layout_toEndOf="@+id/textView2"
    android:layout_centerVertical="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:textSize="24sp" />

<Button
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="Show another fun fact!"
    android:id="@+id/showFactButton"
    android:textSize="24sp"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true" />

</RelativeLayout>