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

Code Challenge Weather App Change Gravity

I am working on the code challenge for the weather app where we are asked to change the gravity.

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/movieTitle"
    android:layout_centerHorizontal="true"
    android:id="@+id/linearLayout">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text=""
        android:id="@+id/textView"
        andriod:gravity="left"
        android:layout_weight="1" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text=""
        android:id="@+id/textView2"
        andriod:gravity="right"
        android:layout_weight="1" />

</LinearLayout>

The code above seems right to me? But the system is erroring saying: Bummer: Make sure you use gravity for both text views.

Argh, it's adroid:gravity NOT andriod:gravity.

2 Answers

Argh, it's adroid:gravity NOT andriod:gravity.

Hey Paul!

Don't forget to click as well!

I encourage you to do so whenever somebody answers your question - they get credited with points and it lets other users with the same problem easily see the solution :)

Hehe Paul! We all make silly mistakes like that, not to worry!

To let other users know that you've solved this question, either mark my answer as the Best Answer or add your own saying that you fixed it yourself and do so.

Keep coding! :)