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/5325407 to your computer and use it in GitHub Desktop.

Select an option

Save leonguyen/5325407 to your computer and use it in GitHub Desktop.
Android Lab: Linear Layout - Message - 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" >
<EditText
android:id="@+id/editTextTo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:text="To" >
<requestFocus />
</EditText>
<EditText
android:id="@+id/editTextSub"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:text="Subject" />
<EditText
android:id="@+id/editTextMess"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_gravity="top"
android:layout_weight="1"
android:inputType="text"
android:text="Message" />
<Button
android:id="@+id/buttonSend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="Send" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment