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 trialDonnie Turner
2,063 PointsWhy do my changes not show when I run the Fun Facts app.
After updating the text and changing the TextView id and the Button id as in the video, my emulation still appears as the initial blank app. I have saved and then attempted to run to no avail.
<?xml version="1.0" encoding="utf-8"?>
<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"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.donnie.funfacts.FunActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Did You Know?"
android:textSize="24sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Ants stretch when they wake in the morning."
android:id="@+id/factTextView"
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:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
1 Answer
Donnie Turner
2,063 PointsHi Ben,
I lost all of my work on this one and had to recode it after my browser crashed. When I put it in again. It seemed to work.
Thanks!
Ben Deitch
Treehouse TeacherBen Deitch
Treehouse TeacherHey Donnie! Could you include your Activity code as well?