android 制作登录页

项目需要可以直接copy

layout.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#E6E6FA">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="50dp"
        android:orientation="vertical"
        android:padding="30dp">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:drawableLeft="@mipmap/ic_launcher"
            android:text="QQ"
            android:textSize="40sp" />

        <EditText
            android:id="@+id/qq_account"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dp"
            android:hint="QQ号码/邮箱/电话号码"
            android:textSize="30sp" />

        <EditText
            android:id="@+id/qq_password"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="密码"
            android:inputType="textPassword"
            android:textSize="30sp" />

        <Button
            android:id="@+id/qq_login"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="登录"
            android:textSize="40sp" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="忘记密码"
                android:textColor="#00aaff"
                android:textSize="16sp" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:text="新用户注册"
                android:textColor="#00aaff"
                android:textSize="16sp" />
        </RelativeLayout>

        <Button
            android:id="@+id/bt_sd_save"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="存储到sd卡"
            android:textSize="15dp" />

    </LinearLayout>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="80dp"
        android:text="登录即代表阅读并同意阅读条例"
        android:textSize="20sp" />

</RelativeLayout>

效果图:

相关推荐

  1. 15. 登录案例

    2024-04-07 08:04:02       16 阅读
  2. 制作github个人主

    2024-04-07 08:04:02       34 阅读
  3. Blazor Web的登录

    2024-04-07 08:04:02       22 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-07 08:04:02       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-07 08:04:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-07 08:04:02       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-07 08:04:02       20 阅读

热门阅读

  1. ArcGIS10.8保姆式安装教程

    2024-04-07 08:04:02       18 阅读
  2. js的check函数

    2024-04-07 08:04:02       20 阅读
  3. 【00150】2024 金融理论与实务试卷二

    2024-04-07 08:04:02       17 阅读
  4. 方格画(C/C++)

    2024-04-07 08:04:02       18 阅读
  5. CSS3

    CSS3

    2024-04-07 08:04:02      25 阅读
  6. 设计模式,工厂方法模式

    2024-04-07 08:04:02       13 阅读
  7. 软件测试的基本概念及其分类

    2024-04-07 08:04:02       13 阅读
  8. centos如何卸载mysql

    2024-04-07 08:04:02       17 阅读
  9. 【架构四】J2EE技术规范

    2024-04-07 08:04:02       14 阅读