Skip to content

Instantly share code, notes, and snippets.

@redtripleAAA
Created January 27, 2018 06:15
Show Gist options
  • Save redtripleAAA/a36e9779e608ae6dd5430d07ff7e8f54 to your computer and use it in GitHub Desktop.
Save redtripleAAA/a36e9779e608ae6dd5430d07ff7e8f54 to your computer and use it in GitHub Desktop.
Quiz 9 - Lesson 3 - Relative to other views - Udacity
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/lyla_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:textSize="24sp"
android:text="Lyla" />
<TextView
android:id="@+id/me_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@id/lyla_text_view"
android:textSize="24sp"
android:text="Me" />
<TextView
android:id="@+id/natalie_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/lyla_text_view"
android:textSize="24sp"
android:text="Natalie" />
<TextView
android:id="@+id/jennie_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:textSize="24sp"
android:text="Jennie" />
<TextView
android:id="@+id/omoju_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_above="@id/jennie_text_view"
android:textSize="24sp"
android:text="Omoju" />
<TextView
android:id="@+id/amy_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_above="@id/omoju_text_view"
android:textSize="24sp"
android:text="Amy" />
<TextView
android:id="@+id/ben_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:textSize="24sp"
android:text="Ben" />
<TextView
android:id="@+id/kunal_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@id/ben_text_view"
android:textSize="24sp"
android:text="Kunal" />
<TextView
android:id="@+id/kagure_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_toRightOf="@id/ben_text_view"
android:textSize="24sp"
android:text="Kagure" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment