From 0b41126fffe6505ff9aa4d9ad043b4cfde815d55 Mon Sep 17 00:00:00 2001 From: fl_shy Date: Wed, 5 Jun 2024 21:37:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=A7=E5=88=AB=E7=A7=B0=E5=91=BC=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=9C=B0=E5=8C=BA=E9=80=89=E6=8B=A9=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/AndroidManifest.xml | 9 ++ .../com/hnucm/weather/CaptchaActivity.java | 16 +++ .../hnucm/weather/Gender_NameActivity.java | 52 +++++++ .../com/hnucm/weather/RegionActivity.java | 23 +++ .../drawable/edittext_rounded_background.xml | 9 ++ .../drawable/radio_button_female_selector.xml | 15 ++ .../drawable/radio_button_male_selector.xml | 15 ++ src/main/res/drawable/test6.png | Bin 0 -> 406 bytes src/main/res/drawable/test7.png | Bin 0 -> 450 bytes src/main/res/layout/activity_captcha.xml | 8 +- src/main/res/layout/activity_gender_name.xml | 135 ++++++++++++++++++ src/main/res/layout/activity_login.xml | 24 +++- src/main/res/layout/activity_region.xml | 97 +++++++++++++ 新建 文本文档.txt | 0 14 files changed, 398 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/hnucm/weather/Gender_NameActivity.java create mode 100644 src/main/java/com/hnucm/weather/RegionActivity.java create mode 100644 src/main/res/drawable/edittext_rounded_background.xml create mode 100644 src/main/res/drawable/radio_button_female_selector.xml create mode 100644 src/main/res/drawable/radio_button_male_selector.xml create mode 100644 src/main/res/drawable/test6.png create mode 100644 src/main/res/drawable/test7.png create mode 100644 src/main/res/layout/activity_gender_name.xml create mode 100644 src/main/res/layout/activity_region.xml delete mode 100644 新建 文本文档.txt diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index e7212e8..fbb2aa4 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -8,6 +8,15 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.MyApplication"> + + + diff --git a/src/main/java/com/hnucm/weather/CaptchaActivity.java b/src/main/java/com/hnucm/weather/CaptchaActivity.java index 179b3a2..816cea7 100644 --- a/src/main/java/com/hnucm/weather/CaptchaActivity.java +++ b/src/main/java/com/hnucm/weather/CaptchaActivity.java @@ -2,9 +2,11 @@ package com.hnucm.weather; import androidx.appcompat.app.AppCompatActivity; +import android.content.Intent; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; +import android.view.View; import android.widget.EditText; public class CaptchaActivity extends AppCompatActivity { @@ -61,5 +63,19 @@ public class CaptchaActivity extends AppCompatActivity { public void afterTextChanged(Editable s) { } }); + findViewById(R.id.button).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(CaptchaActivity.this,Gender_NameActivity.class); + startActivity(intent); + } + }); + findViewById(R.id.imageView5).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(CaptchaActivity.this,LoginActivity.class); + startActivity(intent); + } + }); } } \ No newline at end of file diff --git a/src/main/java/com/hnucm/weather/Gender_NameActivity.java b/src/main/java/com/hnucm/weather/Gender_NameActivity.java new file mode 100644 index 0000000..fbc5101 --- /dev/null +++ b/src/main/java/com/hnucm/weather/Gender_NameActivity.java @@ -0,0 +1,52 @@ +package com.hnucm.weather; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.CheckBox; +import android.widget.CompoundButton; + +public class Gender_NameActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_gender_name); + CheckBox checkBox1 = findViewById(R.id.checkBox1); + CheckBox checkBox2 = findViewById(R.id.checkBox2); + + checkBox1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + if (isChecked) { + checkBox2.setChecked(false); // 另一个框消失 + } + } + }); + + checkBox2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + if (isChecked) { + checkBox1.setChecked(false); // 另一个框消失 + } + } + }); + findViewById(R.id.imageView6).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Gender_NameActivity.this,CaptchaActivity.class); + startActivity(intent); + } + }); + findViewById(R.id.button).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Gender_NameActivity.this,RegionActivity.class); + startActivity(intent); + } + }); + } +} \ No newline at end of file diff --git a/src/main/java/com/hnucm/weather/RegionActivity.java b/src/main/java/com/hnucm/weather/RegionActivity.java new file mode 100644 index 0000000..77d5f3b --- /dev/null +++ b/src/main/java/com/hnucm/weather/RegionActivity.java @@ -0,0 +1,23 @@ +package com.hnucm.weather; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; + +public class RegionActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_region); + findViewById(R.id.imageView7).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(RegionActivity.this,Gender_NameActivity.class); + startActivity(intent); + } + }); + } +} \ No newline at end of file diff --git a/src/main/res/drawable/edittext_rounded_background.xml b/src/main/res/drawable/edittext_rounded_background.xml new file mode 100644 index 0000000..211b4e4 --- /dev/null +++ b/src/main/res/drawable/edittext_rounded_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/main/res/drawable/radio_button_female_selector.xml b/src/main/res/drawable/radio_button_female_selector.xml new file mode 100644 index 0000000..f5ee56d --- /dev/null +++ b/src/main/res/drawable/radio_button_female_selector.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/main/res/drawable/radio_button_male_selector.xml b/src/main/res/drawable/radio_button_male_selector.xml new file mode 100644 index 0000000..51453c6 --- /dev/null +++ b/src/main/res/drawable/radio_button_male_selector.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/main/res/drawable/test6.png b/src/main/res/drawable/test6.png new file mode 100644 index 0000000000000000000000000000000000000000..f62b59998817212296783388efdfaad08c718301 GIT binary patch literal 406 zcmV;H0crk;P)Px$P)S5VR7gw3m4OX{Fc3wLO>`1v5_J+~5_J-F65T}eu-}{)C?$c=gjDJE{{8#E zw6d8;HFJJj3}9Ge7 zM4BjpY)t{{#LmYw{v1FX`dwNO_jaffnRpG{gd4RVP3m}(qg}n%#~ea|RuRCTW?7GS z#FaWt$=kL?0Q$E{Zt(#8j%Ot&GHdAcr@_#M_&LeNOZ3tA0Svv6T_C^Y{u~TdAJ^qJ ze_!Al{_9iT?wR67BdPS#MTKQ21IV(Ug2A!?A0#zV8Hpcle*gdg07*qoM6N<$f<&*Y AY5)KL literal 0 HcmV?d00001 diff --git a/src/main/res/drawable/test7.png b/src/main/res/drawable/test7.png new file mode 100644 index 0000000000000000000000000000000000000000..055b4d9497b96d57f90ebacd8a7251ca332020ac GIT binary patch literal 450 zcmV;z0X_bSP)Px$d`Uz>R7gwJmElzaK@5aLB}yeoC2A!~B|s%;CEAJl-OKRiLhgiz{4jqGZj+hG zY<6!EH;%=P@#8ND?jz!JO6au&FF(Mq2F~xj6JAU36cMW=pp%CLUyI}%0)b$|NS!H{ zP2|!QF_6p=poV0ginlCu%ReFl0@j`*;xTRG_il=ydMiM>SQh1gV-xB{0x7xcj$oU~ z-C$6($<6>K1gdTkaLBHfl>ikGTpHK`Ikgb99iWJXE_SJiHS(lhxojw%D8Qj+qYfxg zTS`I|McpB)12BMfxgzjQt&=i0rrkk<=opp2r=;tOLOk}aG^PR_t&89*S2^lZfMq%Z z0)!MhuuoB^ZZtUhBNf^#ZTN6layqa|V@aN(3h{GtyiMh$cL1sG6t}^1=nw*huMO|I zDN+}ZqS{B&?fDhl396qOJKk#_G_sI#-}oIRD}8`Q9r%J~y!((iC^eJ70-U=|bz*tm srB&~?(UV^>S9{L);H2$KUi^Q8ZydK|8CvqsCIA2c07*qoM6N<$g7Xc)-T(jq literal 0 HcmV?d00001 diff --git a/src/main/res/layout/activity_captcha.xml b/src/main/res/layout/activity_captcha.xml index f2806f2..60ea5d8 100644 --- a/src/main/res/layout/activity_captcha.xml +++ b/src/main/res/layout/activity_captcha.xml @@ -9,10 +9,10 @@ + + + + + + + + +