Android Studio 学生课程签到系统

本文介绍了一个学生签到系统的设计,包括登录、注册、忘记密码、用户信息和课程签到等功能。系统使用账号密码登录,并需同意协议。新用户注册需要填写昵称、性别、密码、手机号、验证码、邮箱和出生日期。忘记密码通过邮箱或手机验证。用户信息界面展示详细个人信息,签到界面选择课程和课时进行签到操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

b1fd64326642479ba92956653c419a07.png

目录

 一、登录界面

二、新用户注册界面

 三、忘记密码界面

 四、用户信息界面

五、课程签到界面


 学生签到系统通过账号密码登录,如果没有账号可以通过注册来创建一个新用户,如果是忘记了密码也可以通过忘记密码来找回密码(因为这个系统我没有连接数据库,创建新用户和找回密码是无法实现的),登录成功后就可以看到个人用户信息,然后对相应的课程进行签到。

 一、登录界面

<TextView
        android:id="@+id/tv_1_Login"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:text="2022年4月18日物联网201考勤情况:李x迟到,李x旷课,李x上课睡觉"
        android:textSize="35dp"
        android:background="#F40202"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:marqueeRepeatLimit="marquee_forever"
        android:focusable="true"
        android:focusableInTouchMode="true"
        />
    <TextView
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:text="物联网201考勤系统"
        android:textSize="45dp"
        android:gravity="center"
        android:textColor="#F60909"
        android:layout_marginTop="50dp"
        />

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:layout_gravity="center"
        android:layout_marginTop="130dp"
        >
        <TextView
            android:id="@+id/tv_2_Login"
            android:layout_width="wrap_content"
            android:layout_height="32dp"
            android:text="账号:"
            android:textSize="20dp"
            android:gravity="center"
            android:layout_marginTop="2dp"
            />

        <EditText
            android:id="@+id/et_1_Login"
            android:layout_width="160dp"
            android:layout_height="40dp"
            android:layout_marginTop="2dp"
            android:layout_toRightOf="@id/tv_2_Login"
            android:gravity="center"
            android:hint="手机号或邮箱"
            android:textSize="15dp" />

        <TextView
            android:id="@+id/tv_3_Login"
            android:layout_width="wrap_content"
            android:layout_height="32dp"
            android:layout_below="@id/tv_2_Login"
            android:layout_marginTop="14dp"
            android:gravity="center"
            android:text="密码:"
            android:textSize="20dp" />

        <EditText
            android:id="@+id/et_2_Login"
            android:layout_width="160dp"
            android:layout_height="40dp"
            android:layout_below="@id/tv_2_Login"
            android:layout_marginTop="14dp"
            android:layout_toRightOf="@id/tv_3_Login"
            android:gravity="center"
            android:textSize="15dp" />

        <Button
            android:id="@+id/bt_1_Login"
            android:layout_width="wrap_content"
            android:layout_height="50dp"
            android:layout_below="@id/tv_3_Login"
            android:layout_marginLeft="90dp"
            android:layout_marginTop="20dp"
            android:background="@drawable/bt_1_solid_blue"
            android:gravity="center"
            android:text="登录"
            android:textSize="27dp" />

        <Button
            android:id="@+id/bt_2_Login"
            android:layout_width="65dp"
            android:layout_height="32dp"
            android:layout_toRightOf="@id/et_1_Login"
            android:background="@drawable/bt_2_solid_yellow"
            android:text="注册"
            android:textSize="15dp"
            />

        <Button
            android:id="@+id/bt_3_Login"
            android:layout_width="67dp"
            android:layout_height="32dp"
            android:layout_below="@id/bt_2_Login"
            android:layout_marginTop="15dp"
            android:layout_toRightOf="@id/et_2_Login"
            android:background="@drawable/bt_3_stroke_yellow"
            android:text="忘记密码"
            android:textSize="15dp" />

        <CheckBox
            android:id="@+id/cb_1_Login"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/bt_1_Login"
            android:layout_marginLeft="65dp"
            android:layout_marginTop="90dp"
            android:background="@drawable/cb_1_stroke_blue"
            android:checked="true"
            android:text="我同意《xxx协议》"
            android:textColor="#9F9D9D"
            android:textSize="12dp" />
    </RelativeLayout>

public class Login_Screen extends AppCompatActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login_screen);
        CheckBox cb_1_Login=findViewById(R.id.cb_1_Login);//复选框,在xml里面我设置为默认勾选
        cb_1_Login.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);//设置下划线
        TextView tv_1=findViewById(R.id.tv_1_Login);
        tv_1.setSelected(true);//设置跑马灯效果

        String user="admin";//设置用户名
        String passorward="123456";//设置密码
        EditText et_1_Login=findViewById(R.id.et_1_Login);//连接的是用户名编辑框
        EditText et_2_Login=findViewById(R.id.et_2_Login);//连接的是密码编辑框
        Button bt_1=findViewById(R.id.bt_1_Login);//连接的是登录按钮
        bt_1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cb_1_Login.isChecked()){
                    String user_code = et_1_Login.getText().toString();//获取输入的用户名
                    String passorward_code = et_2_Login.getText().toString();//获取输入的密码
                    if (user_code.isEmpty()){
                        Toast.makeText(Login_Screen.this,"请输入账号",Toast.LENGTH_SHORT).show();
                    }else {
                        if (passorward_code.isEmpty()){
                            Toast.makeText(Login_Screen.this,"请输入密码",Toast.LENGTH_SHORT).show();
                        }else {
                            if (user_code.equals(user)){
                                if (passorward_code.equals(passorward)){
                                    Intent intent = new Intent(Login_Screen.this, User_Screen.class);
                                    startActivity(intent);
                                }else {
                                    Toast.makeText(Login_Screen.this,"密码错误,请重新输入",Toast.LENGTH_SHORT).show();
                                }
                            }else {
                                Toast.makeText(Login_Screen.this,"账号错误,请重新输入",Toast.LENGTH_SHORT).show();
                            }
                        }
                    }
                }else {
                    Toast.makeText(Login_Screen.this,"请勾选协议",Toast.LENGTH_SHORT).show();
                }
            }
        });
        Button bt_2_Login=findViewById(R.id.bt_2_Login);//注册按钮的监听
        bt_2_Login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(Login_Screen.this, Registered.class);
                startActivity(intent);
            }
        });

        Button bt_3_Login=findViewById(R.id.bt_3_Login);//忘记密码按钮的监听
        bt_3_Login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(Login_Screen.this, Forgot_Password.class);
                startActivity(intent);
            }
        });
    }
}

 我的登录系统是必须用户和密码以及勾选了用户协议才能登录成功

二、新用户注册界面

f06562cc1d4d4bce95e5c0ceffb68cf2.png

<TextView
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:text="新用户注册界面"
        android:background="#A6F0FA"
        and
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小新不吃辣

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值