Skip to content

Instantly share code, notes, and snippets.

@venkatesh05
Created May 25, 2012 06:59
Show Gist options
  • Save venkatesh05/2786289 to your computer and use it in GitHub Desktop.
Save venkatesh05/2786289 to your computer and use it in GitHub Desktop.
Table Layout demo
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableRow>
<TextView
android:id="@+id/login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Login" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/uname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="User name" />
<EditText
android:id="@+id/username"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_weight="1" >
<requestFocus />
</EditText>
</TableRow>
<TableRow>
<TextView
android:id="@+id/passwordTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Password" />
<EditText
android:id="@+id/password"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="textPassword" />
</TableRow>
<TableRow android:gravity="center">
<Button
android:id="@+id/submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Submit" />
</TableRow>
</TableLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment