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 (retired 2014) Pretty Little Things Animating the Answer

Ricky Sparks
Ricky Sparks
22,249 Points

My "Enlighten me Button" is still the default text font and no color it came with?

How do i add the purple color and midevil times font look?

Charlie Thomas
Charlie Thomas
40,856 Points

Could you show us for activity_main.xml file?

2 Answers

Ricky Sparks
Ricky Sparks
22,249 Points

<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.crystalball.MainActivity$PlaceholderFragment" android:background="@android:color/black" >

<ImageView
    android:id="@+id/imageView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:scaleType="fitCenter"
    android:src="@drawable/ball01" />

<Button
    android:id="@+id/button1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:background="@android:drawable/btn_default"
    android:text="Enlighten me!" />

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_centerVertical="true"
    android:weightSum="1" >

    <View
        android:id="@+id/view1"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="0.2" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="0.6"
        android:textSize="32sp" />

    <View
        android:id="@+id/view2"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="0.2" />

</LinearLayout>

</RelativeLayout>

Ricky Sparks
Ricky Sparks
22,249 Points

didn't know i could post code like that :)

Charlie Thomas
Charlie Thomas
40,856 Points

Change you button code to look like this:

<Button
    android:id="@+id/button1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:background="@android:drawable/btn_default"
    android:text="Enlighten me!" 
    android:textSize="24sp"
    android:typeface="serif"
    android:textStyle="bold|italic"
    android:textColor="#3f0f7f" />
Ricky Sparks
Ricky Sparks
22,249 Points

Thank you verrrry Much :