diff --git a/chengzi/.gitignore b/chengzi/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/chengzi/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/chengzi/.idea/.gitignore b/chengzi/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/chengzi/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/chengzi/.idea/compiler.xml b/chengzi/.idea/compiler.xml new file mode 100644 index 0000000..fb7f4a8 --- /dev/null +++ b/chengzi/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/chengzi/.idea/gradle.xml b/chengzi/.idea/gradle.xml new file mode 100644 index 0000000..ce86a83 --- /dev/null +++ b/chengzi/.idea/gradle.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/chengzi/.idea/misc.xml b/chengzi/.idea/misc.xml new file mode 100644 index 0000000..bdd9278 --- /dev/null +++ b/chengzi/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/chengzi/.idea/render.experimental.xml b/chengzi/.idea/render.experimental.xml new file mode 100644 index 0000000..8ec256a --- /dev/null +++ b/chengzi/.idea/render.experimental.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/chengzi/app/.gitignore b/chengzi/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/chengzi/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/chengzi/app/build.gradle b/chengzi/app/build.gradle new file mode 100644 index 0000000..397fde6 --- /dev/null +++ b/chengzi/app/build.gradle @@ -0,0 +1,41 @@ +plugins { + id 'com.android.application' +} + +android { + namespace 'com.example.chengzi' + compileSdk 33 + + defaultConfig { + applicationId "com.example.chengzi" + minSdk 24 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.4.1' + implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.3' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + implementation 'com.github.crazyandcoder:citypicker:6.0.2' + +} diff --git a/chengzi/app/proguard-rules.pro b/chengzi/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/chengzi/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/chengzi/app/src/androidTest/java/com/example/chengzi/ExampleInstrumentedTest.java b/chengzi/app/src/androidTest/java/com/example/chengzi/ExampleInstrumentedTest.java new file mode 100644 index 0000000..3a45dbb --- /dev/null +++ b/chengzi/app/src/androidTest/java/com/example/chengzi/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.chengzi; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.chengzi", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/chengzi/app/src/main/AndroidManifest.xml b/chengzi/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..6b8ebd1 --- /dev/null +++ b/chengzi/app/src/main/AndroidManifest.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/chengzi/app/src/main/java/com/example/chengzi/MainActivity.java b/chengzi/app/src/main/java/com/example/chengzi/MainActivity.java new file mode 100644 index 0000000..0c0938d --- /dev/null +++ b/chengzi/app/src/main/java/com/example/chengzi/MainActivity.java @@ -0,0 +1,40 @@ +package com.example.chengzi; + +import static androidx.constraintlayout.helper.widget.MotionEffect.TAG; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.DialogInterface; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.Button; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); //初始化 + setContentView(R.layout.activity_main); //创建一个布局文件 + Button button =(Button) findViewById(R.id.login2); + button.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Intent intent = new Intent(); + intent.setClass(MainActivity.this,reigester.class); + startActivity(intent); + Log.w(TAG, "onClick:点击了注册按钮 "); + } + }); + Button button1=(Button) findViewById(R.id.login); + button1.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Intent intent = new Intent(); + intent.setClass(MainActivity.this,userinformation.class); + startActivity(intent); + } + }); + } +} \ No newline at end of file diff --git a/chengzi/app/src/main/java/com/example/chengzi/reigester.java b/chengzi/app/src/main/java/com/example/chengzi/reigester.java new file mode 100644 index 0000000..a1fbf9d --- /dev/null +++ b/chengzi/app/src/main/java/com/example/chengzi/reigester.java @@ -0,0 +1,48 @@ +package com.example.chengzi; + +import androidx.appcompat.app.AppCompatActivity; + +import android.os.Bundle; +import android.view.View; +import android.widget.TextView; + +import com.lljjcoder.Interface.OnCityItemClickListener; +import com.lljjcoder.bean.CityBean; +import com.lljjcoder.bean.DistrictBean; +import com.lljjcoder.bean.ProvinceBean; +import com.lljjcoder.citywheel.CityConfig; +import com.lljjcoder.style.citypickerview.CityPickerView; + +public class reigester extends AppCompatActivity { + private TextView cityText; + CityPickerView mPicker = new CityPickerView(); + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.reigster); + mPicker.init(this); + cityText = findViewById(R.id.reg_province); + cityText.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + initCityPicker(); + mPicker.showCityPicker(); + } + }); + } + public void initCityPicker(){ + CityConfig cityConfig = new CityConfig.Builder().build(); + mPicker.setConfig(cityConfig); + mPicker.setOnCityItemClickListener(new OnCityItemClickListener() { + @Override + public void onSelected(ProvinceBean province, CityBean city, DistrictBean district) { + cityText.setText(String.format("%s %s %s",province, city, district)); + } + + @Override + public void onCancel() { + super.onCancel(); + } + }); + } +} \ No newline at end of file diff --git a/chengzi/app/src/main/java/com/example/chengzi/userinformation.java b/chengzi/app/src/main/java/com/example/chengzi/userinformation.java new file mode 100644 index 0000000..bee4dc0 --- /dev/null +++ b/chengzi/app/src/main/java/com/example/chengzi/userinformation.java @@ -0,0 +1,14 @@ +package com.example.chengzi; + +import androidx.appcompat.app.AppCompatActivity; + +import android.os.Bundle; + +public class userinformation extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.userinformation); + } +} \ No newline at end of file diff --git a/chengzi/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/chengzi/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/chengzi/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/chengzi/app/src/main/res/drawable/address.png b/chengzi/app/src/main/res/drawable/address.png new file mode 100644 index 0000000..5971207 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/address.png differ diff --git a/chengzi/app/src/main/res/drawable/arrow_down.png b/chengzi/app/src/main/res/drawable/arrow_down.png new file mode 100644 index 0000000..ca01021 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/arrow_down.png differ diff --git a/chengzi/app/src/main/res/drawable/button_login.png b/chengzi/app/src/main/res/drawable/button_login.png new file mode 100644 index 0000000..42d3052 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/button_login.png differ diff --git a/chengzi/app/src/main/res/drawable/button_register.png b/chengzi/app/src/main/res/drawable/button_register.png new file mode 100644 index 0000000..42d3052 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/button_register.png differ diff --git a/chengzi/app/src/main/res/drawable/city.png b/chengzi/app/src/main/res/drawable/city.png new file mode 100644 index 0000000..055e886 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/city.png differ diff --git a/chengzi/app/src/main/res/drawable/currency.png b/chengzi/app/src/main/res/drawable/currency.png new file mode 100644 index 0000000..f1f6c24 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/currency.png differ diff --git a/chengzi/app/src/main/res/drawable/ic_launcher_background.xml b/chengzi/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/chengzi/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chengzi/app/src/main/res/drawable/kajuan.png b/chengzi/app/src/main/res/drawable/kajuan.png new file mode 100644 index 0000000..396efdf Binary files /dev/null and b/chengzi/app/src/main/res/drawable/kajuan.png differ diff --git a/chengzi/app/src/main/res/drawable/left.png b/chengzi/app/src/main/res/drawable/left.png new file mode 100644 index 0000000..a8514ba Binary files /dev/null and b/chengzi/app/src/main/res/drawable/left.png differ diff --git a/chengzi/app/src/main/res/drawable/orange.png b/chengzi/app/src/main/res/drawable/orange.png new file mode 100644 index 0000000..03d465b Binary files /dev/null and b/chengzi/app/src/main/res/drawable/orange.png differ diff --git a/chengzi/app/src/main/res/drawable/passward.png b/chengzi/app/src/main/res/drawable/passward.png new file mode 100644 index 0000000..0ef23a0 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/passward.png differ diff --git a/chengzi/app/src/main/res/drawable/sex.png b/chengzi/app/src/main/res/drawable/sex.png new file mode 100644 index 0000000..c217c2e Binary files /dev/null and b/chengzi/app/src/main/res/drawable/sex.png differ diff --git a/chengzi/app/src/main/res/drawable/sure_passward.png b/chengzi/app/src/main/res/drawable/sure_passward.png new file mode 100644 index 0000000..24cd912 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/sure_passward.png differ diff --git a/chengzi/app/src/main/res/drawable/system.png b/chengzi/app/src/main/res/drawable/system.png new file mode 100644 index 0000000..8dfb7ac Binary files /dev/null and b/chengzi/app/src/main/res/drawable/system.png differ diff --git a/chengzi/app/src/main/res/drawable/user.png b/chengzi/app/src/main/res/drawable/user.png new file mode 100644 index 0000000..61b45a7 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/user.png differ diff --git a/chengzi/app/src/main/res/drawable/user_name.png b/chengzi/app/src/main/res/drawable/user_name.png new file mode 100644 index 0000000..3f1dab6 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/user_name.png differ diff --git a/chengzi/app/src/main/res/drawable/user_orange.png b/chengzi/app/src/main/res/drawable/user_orange.png new file mode 100644 index 0000000..843afe5 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/user_orange.png differ diff --git a/chengzi/app/src/main/res/drawable/user_sex.png b/chengzi/app/src/main/res/drawable/user_sex.png new file mode 100644 index 0000000..4fe4617 Binary files /dev/null and b/chengzi/app/src/main/res/drawable/user_sex.png differ diff --git a/chengzi/app/src/main/res/layout/activity_main.xml b/chengzi/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..0c1ccbd --- /dev/null +++ b/chengzi/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + +