第九周周四(冲刺第四天)

今天:写完了前端逻辑的登录注册,核对了接口

明天:写菜单界面。

两个功能的布局文件:

复制代码
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:layout_height="match_parent"
    tools:context=".LoginActivity">

    <View
        android:layout_width="match_parent"
        android:background="@color/my_light_primary"
        android:layout_height="100dp"/>

    <ImageView
        android:layout_width="match_parent"
        android:scaleType="centerCrop"
        android:src="@mipmap/img_login_logo"
        android:layout_height="200dp"/>

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textSize="20sp"
        android:textStyle="bold"
        android:layout_margin="20dp"
        android:textColor="#333"
        android:text="登录"/>




    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_width="match_parent"
        android:layout_margin="26dp"
        android:layout_height="wrap_content">

    </androidx.appcompat.widget.LinearLayoutCompat>

    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_marginTop="10dp"
        android:layout_width="match_parent"
        android:background="@drawable/login_et_bg"
        android:layout_height="50dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:src="@drawable/baseline_account_box_24" />


        <EditText
            android:id="@+id/et_usernameL"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginLeft="10dp"
            android:background="@null"
            android:hint="请输入用户名"
            android:textSize="14sp" />


    </androidx.appcompat.widget.LinearLayoutCompat>


    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_width="match_parent"
        android:background="@drawable/login_et_bg"
        android:layout_height="50dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:src="@drawable/baseline_https_24" />


        <EditText
            android:id="@+id/et_passwordL"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginLeft="10dp"
            android:background="@null"
            android:hint="请输入密码"
            android:inputType="textPassword"
            android:textSize="14sp" />


    </androidx.appcompat.widget.LinearLayoutCompat>


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_marginTop="10dp">

        <CheckBox
            android:id="@+id/cb_auto_login"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="自动登录"
            android:textColor="#333"
            android:textSize="14sp"
            android:layout_gravity="center_vertical"
            android:paddingEnd="10dp"/>

        <TextView
            android:id="@+id/tv_toRegister"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:textColor="@color/my_light_primary"
            android:gravity="right"
            android:text="还未注册?"/>

    </LinearLayout>

    <Button
        android:id="@+id/btn_login"
        android:layout_width="match_parent"
        android:text="登录"
        android:layout_marginTop="20dp"
        android:layout_height="50dp"/>



</androidx.appcompat.widget.LinearLayoutCompat>
复制代码
复制代码
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:layout_height="match_parent"
    tools:context=".RegisterActivity">


    <androidx.appcompat.widget.Toolbar
        android:id="@+id/tb_toLogin"
        android:layout_width="match_parent"
        app:titleTextColor="@color/white"
        app:title="注册"
        app:navigationIcon="@drawable/baseline_arrow_back_24"
        android:layout_height="wrap_content"
        android:background="@color/my_light_primary"/>

    <View
        android:layout_width="match_parent"
        android:background="@color/my_light_primary"
        android:layout_height="50dp"/>

    <ImageView
        android:layout_width="match_parent"
        android:scaleType="centerCrop"
        android:src="@mipmap/img_login_logo"
        android:layout_height="200dp"/>

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textSize="20sp"
        android:textStyle="bold"
        android:layout_margin="20dp"
        android:textColor="#333"
        android:text="注册"/>




<!--    <androidx.appcompat.widget.LinearLayoutCompat-->
<!--        android:layout_width="match_parent"-->
<!--        android:layout_margin="26dp"-->
<!--        android:layout_height="wrap_content">-->

<!--    </androidx.appcompat.widget.LinearLayoutCompat>-->

    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_marginTop="10dp"
        android:layout_width="match_parent"
        android:background="@drawable/login_et_bg"
        android:layout_height="50dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:src="@drawable/baseline_account_box_24" />


        <EditText
            android:id="@+id/et_username"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginLeft="10dp"
            android:background="@null"
            android:hint="请输入账号"
            android:textSize="14sp" />


    </androidx.appcompat.widget.LinearLayoutCompat>


    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_width="match_parent"
        android:background="@drawable/login_et_bg"
        android:layout_height="50dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:src="@drawable/baseline_https_24" />


        <EditText
            android:id="@+id/et_password"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginLeft="10dp"
            android:background="@null"
            android:hint="请输入密码"
            android:inputType="textPassword"
            android:textSize="14sp" />


    </androidx.appcompat.widget.LinearLayoutCompat>

    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_marginTop="10dp"
        android:layout_width="match_parent"
        android:background="@drawable/login_et_bg"
        android:layout_height="50dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:src="@drawable/baseline_accessibility_new_24" />


        <EditText
            android:id="@+id/et_nickname"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginLeft="10dp"
            android:background="@null"
            android:hint="请输入昵称"
            android:textSize="14sp" />


    </androidx.appcompat.widget.LinearLayoutCompat>

    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_marginTop="10dp"
        android:layout_width="match_parent"
        android:background="@drawable/login_et_bg"
        android:layout_height="50dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:src="@drawable/baseline_phone_android_24" />


        <EditText
            android:id="@+id/et_phone_number"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginLeft="10dp"
            android:background="@null"
            android:hint="请输入电话号码"
            android:textSize="14sp" />


    </androidx.appcompat.widget.LinearLayoutCompat>


    <Button
        android:id="@+id/btn_subRegister"
        android:layout_width="match_parent"
        android:text="注册"
        android:layout_marginTop="20dp"
        android:layout_height="50dp"/>

</androidx.appcompat.widget.LinearLayoutCompat>
复制代码

 

posted @   a_true  阅读(1)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
历史上的今天:
2023-04-25 折半查找
点击右上角即可分享
微信分享提示