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 Android Lists and Adapters (2015) Using Parcelable Data Updating the Daily Forecast UI

when trying to choose bottom:top no locationLabel

when trying to choose bottom:top no locationLabel appears, it's only appearing in left or right so what is the solution ?

Pablo Rocha
Pablo Rocha
10,142 Points

Timothy Boland - if adding manually to the xml then there is error "Rendering Problems Exception raised during rendering: Circular dependencies cannot exist in RelativeLayout". See my answer below, that should remedy the problem.

2 Answers

Pablo Rocha
Pablo Rocha
10,142 Points

Unset all attributes in the layout:alignComponent for the locationLabel. Then you will be able to choose locationLabel when setting for the ListView. Also, make sure the alignParent for locationLabel is set to bottom only.

James N
James N
17,864 Points

hey thanks! this helped me out! I can't best answer you since I didn't post this but I'll up vote u!

Hello, I had the same issue. The dependency here is coming from the way how the other two components are assigned (to relative layout or other elements). In this case textView's needs to be assigned as following:

top one:

    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"

bottom one:

    android:layout_centerHorizontal="true"
    android:layout_alignParentBottom="true"

It is also important that non of above textView will be assigned to the listView. In my layout it looks as following:

<ListView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@android:id/list" android:layout_alignParentTop="false" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_below="@+id/thisWeekLabel" android:layout_above="@+id/locationLabel" android:layout_marginTop="8dp" android:layout_marginBottom="8dp" android:divider="@null" android:dividerHeight="0dp"/>

Thanks, Hubert