效果图:
代码:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/图片文件名"
android:gravity="center">
<TableRow>
<TextView
android:text="账号:"
android:textSize="30dp"
android:layout_marginLeft="50dp"
android:textColor="#000000"
/>
<EditText
android:hint="请输入账号:"
android:textSize="30dp"
/>
</TableRow>
<TableRow>
<TextView
android:text="密码:"
android:textSize="30dp"
android:layout_marginLeft="50dp"
android:textColor="#000000"
/>
<EditText
android:hint="请输入密码:"
android:textSize="30dp"
/>
</TableRow>
<Button
android:text="登录"
android:textSize="30dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:textColor="#000000"
android:background="#FFFAFA"
/>
<TableRow>
<TextView
android:text="忘记密码"
android:textSize="20dp"
android:textColor="#4797ca"
android:layout_marginLeft="40dp"
android:layout_marginTop="15dp"
/>
<TextView
android:text="注册新账号"
android:textSize="20dp"
android:textColor="#4797ca"
android:layout_marginLeft="130dp"
android:layout_marginTop="15dp"
/>
</TableRow>
</TableLayout>