Compare commits
No commits in common. 'master' and 'main' have entirely different histories.
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<value>
|
||||||
|
<entry key="MainActivity3">
|
||||||
|
<State />
|
||||||
|
</entry>
|
||||||
|
<entry key="app">
|
||||||
|
<State />
|
||||||
|
</entry>
|
||||||
|
</value>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
@ -0,0 +1,116 @@
|
|||||||
|
package com.example.app1;
|
||||||
|
|
||||||
|
import android.app.DatePickerDialog;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.annotation.IdRes;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
public class MainActivity3 extends AppCompatActivity implements View.OnClickListener{
|
||||||
|
private TextView reg_username;
|
||||||
|
private TextView reg_password;
|
||||||
|
private TextView reg_sure_password;
|
||||||
|
private RadioGroup radiogroup;
|
||||||
|
private CheckBox ah1,ah2,ah3,ah4;
|
||||||
|
private String sex="男";
|
||||||
|
private String aihao1="",aihao2="",aihao3="",aihao4="";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
//这个是获取布局文件的,这里是你下一个页面的布局文件//注意这个是跳转界面的不能设置错,应该是第一个
|
||||||
|
setContentView(R.layout.user_register);
|
||||||
|
//组件初始化
|
||||||
|
reg_username = findViewById(R.id.reg_username);
|
||||||
|
reg_password = findViewById(R.id.reg_password);
|
||||||
|
reg_sure_password = findViewById(R.id.reg_sure_password);
|
||||||
|
|
||||||
|
findViewById(R.id.reg_register).setOnClickListener((View.OnClickListener) this);
|
||||||
|
radiogroup=findViewById(R.id.rp);
|
||||||
|
radiogroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||||
|
if(checkedId==R.id.man)
|
||||||
|
{sex="男";}
|
||||||
|
if(checkedId==R.id.woman)
|
||||||
|
{sex="女";}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ah1=findViewById(R.id.chang);
|
||||||
|
ah2=findViewById(R.id.tiao);
|
||||||
|
ah3=findViewById(R.id.rap);
|
||||||
|
ah4=findViewById(R.id.basketball);
|
||||||
|
CompoundButton.OnCheckedChangeListener occl=new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
|
if(buttonView.getId()==R.id.chang){
|
||||||
|
if(isChecked){aihao1="唱";}
|
||||||
|
else{aihao1="";}
|
||||||
|
}
|
||||||
|
else if(buttonView.getId()==R.id.tiao){
|
||||||
|
if(isChecked){aihao2="跳";}
|
||||||
|
else{aihao2="";}
|
||||||
|
}
|
||||||
|
else if(buttonView.getId()==R.id.rap){
|
||||||
|
if(isChecked){aihao3="rap";}
|
||||||
|
else{aihao3="";}
|
||||||
|
}
|
||||||
|
else if(buttonView.getId()==R.id.basketball){
|
||||||
|
if(isChecked){aihao4="篮球";}
|
||||||
|
else{aihao4="";}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
ah1.setOnCheckedChangeListener(occl);
|
||||||
|
ah2.setOnCheckedChangeListener(occl);
|
||||||
|
ah3.setOnCheckedChangeListener(occl);
|
||||||
|
ah4.setOnCheckedChangeListener(occl);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View view){
|
||||||
|
String password = reg_password.getText().toString();
|
||||||
|
String surepassword = reg_sure_password.getText().toString();
|
||||||
|
if(password.equals(surepassword)){
|
||||||
|
Intent intent1 = new Intent(this, shuju.class);
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("username",reg_username.getText().toString());
|
||||||
|
bundle.putString("paswd",reg_password.getText().toString());
|
||||||
|
bundle.putString("sex",sex);
|
||||||
|
bundle.putString("ah1",aihao1);
|
||||||
|
bundle.putString("ah2",aihao2);
|
||||||
|
bundle.putString("ah3",aihao3);
|
||||||
|
bundle.putString("ah4",aihao4);
|
||||||
|
|
||||||
|
intent1.putExtras(bundle);
|
||||||
|
startActivity(intent1);
|
||||||
|
}else{
|
||||||
|
Toast.makeText(MainActivity3.this,"两次输入密码错不一致!",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void fanhui(View view) {
|
||||||
|
Intent intent5 = new Intent(MainActivity3.this,MainActivity2.class);
|
||||||
|
this.startActivity(intent5);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Before Width: | Height: | Size: 577 KiB After Width: | Height: | Size: 577 KiB |
Before Width: | Height: | Size: 895 KiB After Width: | Height: | Size: 895 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 945 B After Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 857 B After Width: | Height: | Size: 857 B |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 465 B |
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 333 KiB After Width: | Height: | Size: 333 KiB |
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |
Before Width: | Height: | Size: 392 KiB After Width: | Height: | Size: 392 KiB |
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 982 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |