首页 > 其他分享 >4.26

4.26

时间:2024-06-13 18:56:40浏览次数:19  
标签:Toast void new import android public 4.26

package com.example.test_one;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

import com.example.test_one.dao.UserDao;

public class MainActivity extends AppCompatActivity {

EditText account;
EditText password;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

account = findViewById(R.id.account);
password = findViewById(R.id.password);
}

// 跳转登录
public void login(View view) {
String account1 = account.getText().toString();
String password1 = password.getText().toString();

Thread thread = new Thread() {
public void run() {
if (UserDao.login(account1, password1)) {
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(MainActivity.this, "登录成功", Toast.LENGTH_SHORT).show();
}
});
startActivity(new Intent(MainActivity.this, Function_page.class));
} else {
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(MainActivity.this, "登录失败", Toast.LENGTH_SHORT).show();
}
});
}
}
};
thread.start();
}

// 跳转注册
public void reg(View view) {
startActivity(new Intent(this, register.class));
}



}

标签:Toast,void,new,import,android,public,4.26
From: https://www.cnblogs.com/kongxiangzeng/p/18246533

相关文章

  • 2024.4.26日团队开发第七天
    学习时间1h代码行数50行博客量1篇学习内容主要完成了视频发布页面的展示代码<template><viewstyle="height:700px;"><viewclass="blank"></view><cu-custombgColor="bg-black":isBack="true&q......
  • 腾讯公益赛个人冲刺博客4(2024.4.26)
    今天完善了帮扶程序的后端,实现了后端的增和查询packagecom.example.helppeople;importandroid.annotation.SuppressLint;importandroid.content.Intent;importandroid.os.Bundle;importandroidx.appcompat.app.AppCompatActivity;importcom.example.helppeople.R;......
  • 腾讯公益赛冲刺团队博客4(2024.4.26)
    未完成sos功能后端,在线医生、社交功能进行中帮扶功能的后端已完成sos、帮扶前端、登录注册、主页  ......
  • [转载]一些人士论文的学术指标[2017.4.26 from sina blog]
    大连海事大学贾欣乐教授博文。原文地址:一些人士论文的学术指标作者:贾欣乐    ......
  • ue4.26 通过材质开关控制mesh pass的blend function
    一,meshpass中blendfunction的设置方法在meshpass中设置blendfunction有如下几种方式:1,在CreateXXXProcessor(返回FXXXProcessor)中: 2,FXXXProcessor::AddMeshBatch中: 3,FXXXProcessor::Process中: 4,RenderXXX中: 二,材质开关访问途径我们知道,访问材质开关有以下几种......
  • 4.26
    packagecom.example.yibaifen;importandroid.annotation.SuppressLint;importandroid.content.Context;importandroid.os.Bundle;importandroid.view.LayoutInflater;importandroid.view.View;importandroid.view.ViewGroup;importandroid.widget.Button;importandro......
  • 4.26
    小组项目配置邮箱验证码修改登录密码springbootyml配置```spring:mail:#邮件服务器地址host:smtp.qq.com#协议默认就是smtpprotocol:smtp#编码格式默认就是utf-8default-encoding:utf-8#邮箱username:[email protected]#1......
  • 关于SAP-APP机器-R3trans -d报错-R3trans: /lib64/libstdc++.so.6: version `GLIBCXX_
    在SAP-应用-APP-机器上执行如下命令报错awpxxx03:prdadm270>R3trans-dR3trans:/lib64/libstdc++.so.6:version`GLIBCXX_3.4.26'notfound(requiredbyR3trans) 其实之前,使用过一种方法解决这个问题,可以参考笔者另一篇文章《关于Redhat-Linux中-compat-sap-c++的说......
  • ue4.26 CurveLinearColorAtlas支持非正方形尺寸
    默认CurveAtlas只能是正方形 改代码可以让它支持非正方形: 改法如下:CurveLinearColorAtlas.h//CopyrightEpicGames,Inc.AllRightsReserved.#pragmaonce#include"CoreMinimal.h"#include"UObject/ObjectMacros.h"#include"UObject/Object.h"#in......
  • ue4.26 forward translucency shadow
    对于前向透明材质:想找到其阴影代码。首先由于是前向透明物体,所以肯定不是像不透明物体那样有screenspaceshadowmask图,而是在shader中计算前向光照时顺便计算阴影。所以只需找到相应shader文件。为此用renderDoc截帧,但默认截帧只显示pass名,而不显示shader名,为了显示s......