android 制作登录页

项目需要可以直接copy

layout.xml

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>

效果图:

相关推荐
zh_xuan2 小时前
Android Hilt实现依赖注入
android·hilt
freshman_y3 小时前
Qtcreator怎么新建安卓项目?编写一个五子棋游戏APP?
android·qt
时寒的笔记4 小时前
js逆向7_案例惠nong网
android·开发语言·javascript
肯多洛夫斯基4 小时前
安卓工控屏静默连WiFi全攻略
android
极梦网络无忧5 小时前
Android无障碍服务实现抖音直播间界面监控(场控助手核心原理)
android
call me by ur name6 小时前
ERNIE 5.0 Technical Report论文解读
android·开发语言·人工智能·机器学习·ai·kotlin
kerli6 小时前
Compose 组件:Box 核心参数及其 Bias 算法
android·前端
BLUcoding6 小时前
Android 常用控件及核心属性
android
遥不可及zzz7 小时前
[特殊字符] Android AAB 一键安装工具配置指南
android·macos
私人珍藏库7 小时前
【Android】一键硬核锁手机
android·智能手机·app·工具·软件