Skip to content

Instantly share code, notes, and snippets.

@leonguyen
Last active December 15, 2015 21:28
Show Gist options
  • Select an option

  • Save leonguyen/5325475 to your computer and use it in GitHub Desktop.

Select an option

Save leonguyen/5325475 to your computer and use it in GitHub Desktop.
Android Lab: Relative Layout - Reminder - Defining an XML Layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<EditText
android:id="@+id/editTextName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Reminder name" />
<Spinner
android:id="@+id/spinDate"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/editTextName"
android:layout_toLeftOf="@+id/spinTime" />
<Spinner
android:id="@id/spinTime"
android:layout_width="96dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/editTextName"/>
<Button
android:layout_width="96dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/spinTime"
android:text="Done" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment