每日会议20230418

进度汇报:

吕金帅:解决了部分页面显示乱码问题

张博文:添加了验证登录的界面

布局文件:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_height="match_parent"
android:orientation="vertical"
tools:context=".LoginActivity">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="随手买——车主端APP"
android:layout_marginLeft="10dp"
android:layout_marginTop="30dp"
android:textSize="40dp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="80dp"
android:gravity="center_vertical"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="账 号:"
android:textSize="25sp"
/>
<EditText
android:id="@+id/et_uid"
android:layout_width="match_parent"
android:layout_height="50dp"
android:hint="请输入用户名或手机号"
android:textSize="18sp"
android:layout_marginLeft="10dp"
android:paddingLeft="5dp"
android:inputType="text"
android:background="@drawable/edit_text"
/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="40dp"
android:gravity="center_vertical"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="设备号:"
android:textSize="25sp"
/>

<EditText
android:id="@+id/et_cid"
android:layout_width="match_parent"
android:layout_height="50dp"
android:hint="请输入设备号"
android:textSize="18sp"
android:layout_marginLeft="10dp"
android:paddingLeft="5dp"
android:inputType="text"
android:background="@drawable/edit_text"
/>

</LinearLayout>


<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginTop="20dp"
>

</LinearLayout>

<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/btn_bg_selector"
android:text="绑定登录"
android:textColor="@color/white"
android:textSize="25sp" />



</LinearLayout>

Java文件:
package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class LoginActivity extends AppCompatActivity {

private Button btnLogin;
private EditText etUid, etCid;

private String userID = "zhangbowen";
private String phone_num = "15947976966";
private String carID = "123456";

@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
getSupportActionBar().setTitle("登录");
btnLogin = findViewById(R.id.btn_login);
etUid = findViewById(R.id.et_uid);
etCid = findViewById(R.id.et_cid);

btnLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String Uid = etUid.getText().toString();
String Cid = etCid.getText().toString();

if (TextUtils.equals(Uid, userID)||TextUtils.equals(Uid,phone_num)) {
if (TextUtils.equals(Cid, carID)) {
btnLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(LoginActivity.this, MainActivity.class);
startActivity(intent);
}
});
Toast.makeText(LoginActivity.this, "登录成功", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(LoginActivity.this, "设备号错误", Toast.LENGTH_LONG).show();
}
} else {
Toast.makeText(LoginActivity.this, "用户名或手机号错误", Toast.LENGTH_LONG).show();
}
}
});
}
}

赵纪旭:完成了科技政策查询的web页面的相关调整;已经学完小程序的购物详情界面。

 

具体目标:想调用MTech的接口但是一直报错没有实现;编写完成小程序的购物详情页面;

会议图片:

posted @   一直队  阅读(17)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
· 使用C#创建一个MCP客户端
点击右上角即可分享
微信分享提示