Android studio设计一个简单的登录界面

发布于:2022-10-27 ⋅ 阅读:(399) ⋅ 点赞:(0)

效果图:96a60370106340a38df487fbd04a5d55.png

 代码:

<?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>

本文含有隐藏内容,请 开通VIP 后查看

网站公告

今日签到

点亮在社区的每一天
去签到