Border.xml (in Drawable Folder)
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="2dp"
android:color="#FF0000" />
<padding
android:left="2dp"
android:top="4dp"
android:right="2dp"
android:bottom="4dp" />
<corners
android:radius="5dp" />
<solid
android:color="#FFFFFF"/>
</shape>
Main.xml
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:background="@drawable/border"
android:visibility="visible"
>
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:hint="Username"
android:singleLine="true"
android:textColor="@drawable/focuscolor" />
</TableRow>
<View
android:layout_height="2dp"
android:background="#FF0000" />
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:hint="Password"
android:singleLine="true"
android:textColor="@drawable/focuscolor" />
</TableRow>
</TableLayout>
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="2dp"
android:color="#FF0000" />
<padding
android:left="2dp"
android:top="4dp"
android:right="2dp"
android:bottom="4dp" />
<corners
android:radius="5dp" />
<solid
android:color="#FFFFFF"/>
</shape>
Main.xml
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:background="@drawable/border"
android:visibility="visible"
>
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:hint="Username"
android:singleLine="true"
android:textColor="@drawable/focuscolor" />
</TableRow>
<View
android:layout_height="2dp"
android:background="#FF0000" />
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:hint="Password"
android:singleLine="true"
android:textColor="@drawable/focuscolor" />
</TableRow>
</TableLayout>
No comments:
Post a Comment