Questions

how to use tablelayout in android

Table Layout :-

I want to know how to use the table layout within the android mobile application, please give sample code to help me :)

Your Answers

Your Name:
Your Answers :
<> is a code tag
Preview
Enter the verification code:

Answers

Infario
Sep 15 09 04:46:00
Hope this will help you

<?xml version="1.0" encoding="utf-8" ?>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:background="#000044">
<TableRow>
<TextView id="@+id/textName"
android:text="Name:"
android:textColor="#ffffff" />
<EditText id="@+id/editName"
android:width="240px" />
</TableRow>
<TableRow>
<TextView id="@+id/textPasswd"
android:text="Password:"
android:textColor="#ffffff" />
<EditText id="@+id/editPasswd"
android:password="true" />
</TableRow>
<TableRow>
<Button id="@+id/buttonSignIn"
android:text="Sign In" />
</TableRow>
</TableLayout>