Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save leonguyen/5329865 to your computer and use it in GitHub Desktop.
Android Lab: Linear Layout - Register - Defining an XML Layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Full Name" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="5dip" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Email" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="5dp" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Password" />
<EditText
android:id="@+id/reg_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="5dp"
android:password="true" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Register" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:layout_marginTop="40dp"
android:gravity="center"
android:text="Already has account! Login here"
android:textColor="#025f7c"
android:textSize="15dp" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment