Commit b9c422a7c5ae8c4fab482c7d76a492499d41e67a
0 parents
Exists in
master
提交
Showing
267 changed files
with
17026 additions
and
0 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 267 files displayed.
.gitignore
| File was created | 1 | *.iml | |
| 2 | .gradle | ||
| 3 | /local.properties | ||
| 4 | /.idea/caches | ||
| 5 | /.idea/libraries | ||
| 6 | /.idea/modules.xml | ||
| 7 | /.idea/workspace.xml | ||
| 8 | /.idea/navEditor.xml | ||
| 9 | /.idea/assetWizardSettings.xml | ||
| 10 | .DS_Store | ||
| 11 | /build | ||
| 12 | /captures | ||
| 13 | .externalNativeBuild | ||
| 14 | .cxx | ||
| 15 | local.properties | ||
| 16 |
.idea/.gitignore
| File was created | 1 | # Default ignored files | |
| 2 | /shelf/ | ||
| 3 | /workspace.xml | ||
| 4 |
.idea/compiler.xml
| File was created | 1 | <?xml version="1.0" encoding="UTF-8"?> | |
| 2 | <project version="4"> | ||
| 3 | <component name="CompilerConfiguration"> | ||
| 4 | <bytecodeTargetLevel target="11" /> | ||
| 5 | </component> | ||
| 6 | </project> |
.idea/gradle.xml
| File was created | 1 | <?xml version="1.0" encoding="UTF-8"?> | |
| 2 | <project version="4"> | ||
| 3 | <component name="GradleMigrationSettings" migrationVersion="1" /> | ||
| 4 | <component name="GradleSettings"> | ||
| 5 | <option name="linkedExternalProjectsSettings"> | ||
| 6 | <GradleProjectSettings> | ||
| 7 | <option name="testRunner" value="GRADLE" /> | ||
| 8 | <option name="distributionType" value="DEFAULT_WRAPPED" /> | ||
| 9 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
| 10 | <option name="gradleHome" value="$USER_HOME$/.gradle/wrapper/dists/gradle-8.0-bin/ca5e32bp14vu59qr306oxotwh/gradle-8.0" /> | ||
| 11 | <option name="gradleJvm" value="1.8" /> | ||
| 12 | <option name="modules"> | ||
| 13 | <set> | ||
| 14 | <option value="$PROJECT_DIR$" /> | ||
| 15 | <option value="$PROJECT_DIR$/app" /> | ||
| 16 | <option value="$PROJECT_DIR$/libs" /> | ||
| 17 | <option value="$PROJECT_DIR$/libs/common" /> | ||
| 18 | </set> | ||
| 19 | </option> | ||
| 20 | </GradleProjectSettings> | ||
| 21 | </option> | ||
| 22 | </component> | ||
| 23 | </project> |
.idea/jarRepositories.xml
| File was created | 1 | <?xml version="1.0" encoding="UTF-8"?> | |
| 2 | <project version="4"> | ||
| 3 | <component name="RemoteRepositoriesConfiguration"> | ||
| 4 | <remote-repository> | ||
| 5 | <option name="id" value="central" /> | ||
| 6 | <option name="name" value="Maven Central repository" /> | ||
| 7 | <option name="url" value="https://repo1.maven.org/maven2" /> | ||
| 8 | </remote-repository> | ||
| 9 | <remote-repository> | ||
| 10 | <option name="id" value="jboss.community" /> | ||
| 11 | <option name="name" value="JBoss Community repository" /> | ||
| 12 | <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> | ||
| 13 | </remote-repository> | ||
| 14 | <remote-repository> | ||
| 15 | <option name="id" value="maven" /> | ||
| 16 | <option name="name" value="maven" /> | ||
| 17 | <option name="url" value="http://maven.aliyun.com/nexus/content/repositories/google" /> | ||
| 18 | </remote-repository> | ||
| 19 | <remote-repository> | ||
| 20 | <option name="id" value="BintrayJCenter" /> | ||
| 21 | <option name="name" value="BintrayJCenter" /> | ||
| 22 | <option name="url" value="https://jcenter.bintray.com/" /> | ||
| 23 | </remote-repository> | ||
| 24 | <remote-repository> | ||
| 25 | <option name="id" value="maven4" /> | ||
| 26 | <option name="name" value="maven4" /> | ||
| 27 | <option name="url" value="https://jitpack.io" /> | ||
| 28 | </remote-repository> | ||
| 29 | <remote-repository> | ||
| 30 | <option name="id" value="Google" /> | ||
| 31 | <option name="name" value="Google" /> | ||
| 32 | <option name="url" value="https://dl.google.com/dl/android/maven2/" /> | ||
| 33 | </remote-repository> | ||
| 34 | <remote-repository> | ||
| 35 | <option name="id" value="maven2" /> | ||
| 36 | <option name="name" value="maven2" /> | ||
| 37 | <option name="url" value="http://maven.aliyun.com/nexus/content/repositories/jcenter" /> | ||
| 38 | </remote-repository> | ||
| 39 | <remote-repository> | ||
| 40 | <option name="id" value="maven3" /> | ||
| 41 | <option name="name" value="maven3" /> | ||
| 42 | <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" /> | ||
| 43 | </remote-repository> | ||
| 44 | </component> | ||
| 45 | </project> |
.idea/misc.xml
| File was created | 1 | <project version="4"> | |
| 2 | <component name="DesignSurface"> | ||
| 3 | <option name="filePathToZoomLevelMap"> | ||
| 4 | <map> | ||
| 5 | <entry key="app/src/main/res/drawable/bg_solid_btn.xml" value="0.29907407407407405" /> | ||
| 6 | <entry key="app/src/main/res/drawable/bg_solid_btn_grad.xml" value="0.29907407407407405" /> | ||
| 7 | <entry key="app/src/main/res/drawable/bg_solid_white.xml" value="0.21851851851851853" /> | ||
| 8 | <entry key="app/src/main/res/drawable/bg_solid_white_10.xml" value="0.29907407407407405" /> | ||
| 9 | <entry key="app/src/main/res/drawable/bg_solid_white_10_bottom.xml" value="0.2388888888888889" /> | ||
| 10 | <entry key="app/src/main/res/drawable/bg_solid_white_10_or.xml" value="0.24814814814814815" /> | ||
| 11 | <entry key="app/src/main/res/drawable/bg_solid_white_10_top.xml" value="0.2388888888888889" /> | ||
| 12 | <entry key="app/src/main/res/drawable/bg_solid_white_20.xml" value="0.25555555555555554" /> | ||
| 13 | <entry key="app/src/main/res/drawable/checked_xc.xml" value="0.29907407407407405" /> | ||
| 14 | <entry key="app/src/main/res/drawable/select_b_1.xml" value="0.25555555555555554" /> | ||
| 15 | <entry key="app/src/main/res/drawable/select_b_2.xml" value="0.25555555555555554" /> | ||
| 16 | <entry key="app/src/main/res/drawable/select_t_1.xml" value="0.25555555555555554" /> | ||
| 17 | <entry key="app/src/main/res/drawable/welcome_bg.xml" value="0.38958333333333334" /> | ||
| 18 | <entry key="app/src/main/res/layout/activity_add_stu.xml" value="0.3734375" /> | ||
| 19 | <entry key="app/src/main/res/layout/activity_changem.xml" value="0.3734375" /> | ||
| 20 | <entry key="app/src/main/res/layout/activity_login.xml" value="0.20064724919093851" /> | ||
| 21 | <entry key="app/src/main/res/layout/activity_main.xml" value="0.359375" /> | ||
| 22 | <entry key="app/src/main/res/layout/activity_me.xml" value="0.3734375" /> | ||
| 23 | <entry key="app/src/main/res/layout/activity_qr.xml" value="0.1" /> | ||
| 24 | <entry key="app/src/main/res/layout/activity_register.xml" value="0.3734375" /> | ||
| 25 | <entry key="app/src/main/res/layout/activity_sao.xml" value="0.3734375" /> | ||
| 26 | <entry key="app/src/main/res/layout/activity_select_stu.xml" value="0.3734375" /> | ||
| 27 | <entry key="app/src/main/res/layout/activity_set_jia.xml" value="0.3734375" /> | ||
| 28 | <entry key="app/src/main/res/layout/activity_set_nian.xml" value="0.31952662721893493" /> | ||
| 29 | <entry key="app/src/main/res/layout/activity_set_nick.xml" value="0.3734375" /> | ||
| 30 | <entry key="app/src/main/res/layout/activity_set_sex.xml" value="0.2781065088757396" /> | ||
| 31 | <entry key="app/src/main/res/layout/activity_setac.xml" value="0.3734375" /> | ||
| 32 | <entry key="app/src/main/res/layout/activity_yin.xml" value="0.3734375" /> | ||
| 33 | <entry key="app/src/main/res/layout/fragment_home.xml" value="0.1" /> | ||
| 34 | <entry key="app/src/main/res/layout/fragment_me.xml" value="0.13197430135483507" /> | ||
| 35 | <entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.3814814814814815" /> | ||
| 36 | <entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.3814814814814815" /> | ||
| 37 | <entry key="libs/common/src/main/res/drawable/bg_solid_white.xml" value="0.21851851851851853" /> | ||
| 38 | <entry key="libs/common/src/main/res/drawable/default_label_bg.xml" value="0.21851851851851853" /> | ||
| 39 | <entry key="libs/common/src/main/res/drawable/select_map_position_type.xml" value="0.21851851851851853" /> | ||
| 40 | <entry key="libs/common/src/main/res/drawable/shape_dialog_bg.xml" value="0.21851851851851853" /> | ||
| 41 | <entry key="libs/common/src/main/res/layout/dialog_auxiliary_point.xml" value="0.2791666666666667" /> | ||
| 42 | </map> | ||
| 43 | </option> | ||
| 44 | </component> | ||
| 45 | <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="corretto-11" project-jdk-type="JavaSDK"> | ||
| 46 | <output url="file://$PROJECT_DIR$/build/classes" /> | ||
| 47 | </component> | ||
| 48 | <component name="ProjectType"> | ||
| 49 | <option name="id" value="Android" /> | ||
| 50 | </component> | ||
| 51 | </project> |
.idea/vcs.xml
| File was created | 1 | <?xml version="1.0" encoding="UTF-8"?> | |
| 2 | <project version="4"> | ||
| 3 | <component name="VcsDirectoryMappings"> | ||
| 4 | <mapping directory="$PROJECT_DIR$" vcs="Git" /> | ||
| 5 | </component> | ||
| 6 | </project> |
README
app/.gitignore
| File was created | 1 | /build |
app/build.gradle
| File was created | 1 | apply plugin: 'com.android.application' | |
| 2 | apply from: '../config.gradle' | ||
| 3 | |||
| 4 | |||
| 5 | def androidId = rootProject.ext.androidId | ||
| 6 | def support = rootProject.ext.dependencies | ||
| 7 | def url = rootProject.ext.url | ||
| 8 | |||
| 9 | |||
| 10 | android { | ||
| 11 | compileSdk 32 | ||
| 12 | |||
| 13 | defaultConfig { | ||
| 14 | applicationId "com.hjx.parent" | ||
| 15 | minSdk 24 | ||
| 16 | targetSdk 32 | ||
| 17 | versionCode 1 | ||
| 18 | versionName "1.0" | ||
| 19 | |||
| 20 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
| 21 | } | ||
| 22 | |||
| 23 | buildTypes { | ||
| 24 | release { | ||
| 25 | minifyEnabled false | ||
| 26 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
| 27 | } | ||
| 28 | } | ||
| 29 | compileOptions { | ||
| 30 | sourceCompatibility JavaVersion.VERSION_1_8 | ||
| 31 | targetCompatibility JavaVersion.VERSION_1_8 | ||
| 32 | } | ||
| 33 | } | ||
| 34 | |||
| 35 | dependencies { | ||
| 36 | support.each { k, v -> implementation v } | ||
| 37 | api project(path: ':libs:common') | ||
| 38 | implementation 'androidx.appcompat:appcompat:1.5.1' | ||
| 39 | implementation 'com.google.android.material:material:1.6.1' | ||
| 40 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4' | ||
| 41 | |||
| 42 | } |
app/proguard-rules.pro
| File was created | 1 | # Add project specific ProGuard rules here. | |
| 2 | # You can control the set of applied configuration files using the | ||
| 3 | # proguardFiles setting in build.gradle. | ||
| 4 | # | ||
| 5 | # For more details, see | ||
| 6 | # http://developer.android.com/guide/developing/tools/proguard.html | ||
| 7 | |||
| 8 | # If your project uses WebView with JS, uncomment the following | ||
| 9 | # and specify the fully qualified class name to the JavaScript interface | ||
| 10 | # class: | ||
| 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
| 12 | # public *; | ||
| 13 | #} | ||
| 14 | |||
| 15 | # Uncomment this to preserve the line number information for | ||
| 16 | # debugging stack traces. | ||
| 17 | #-keepattributes SourceFile,LineNumberTable | ||
| 18 | |||
| 19 | # If you keep the line number information, uncomment this to | ||
| 20 | # hide the original source file name. | ||
| 21 | #-renamesourcefileattribute SourceFile |
app/src/main/AndroidManifest.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | package="com.hjx.parent"> | ||
| 4 | |||
| 5 | |||
| 6 | <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" /> | ||
| 7 | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <!-- 允许程序改变网络链接状态 --> | ||
| 8 | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 允许程序访问访问WIFI网络状态信息 --> | ||
| 9 | <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- 允许程序改变WIFI链接状态 --> | ||
| 10 | <!-- 6.0系统需要添加权限才能获得wifi列表 --> | ||
| 11 | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
| 12 | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
| 13 | <uses-permission android:name="android.permission.INTERNET" /> | ||
| 14 | <uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
| 15 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
| 16 | |||
| 17 | <uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> | ||
| 18 | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
| 19 | <uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
| 20 | <uses-permission android:name="android.permission.CAMERA" /> | ||
| 21 | <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
| 22 | <uses-permission android:name="android.permission.VIBRATE" /> | ||
| 23 | |||
| 24 | <application | ||
| 25 | android:allowBackup="true" | ||
| 26 | android:icon="@mipmap/icon" | ||
| 27 | android:label="@string/app_name" | ||
| 28 | android:supportsRtl="true" | ||
| 29 | android:theme="@style/Theme.Parent" | ||
| 30 | android:name=".MyApplication" | ||
| 31 | > | ||
| 32 | <activity | ||
| 33 | android:name=".LoginActivity" | ||
| 34 | android:theme="@style/ThemeSplash" | ||
| 35 | android:exported="true"> | ||
| 36 | <intent-filter> | ||
| 37 | <action android:name="android.intent.action.MAIN" /> | ||
| 38 | <category android:name="android.intent.category.LAUNCHER" /> | ||
| 39 | </intent-filter> | ||
| 40 | </activity> | ||
| 41 | <activity android:name=".MainActivity" | ||
| 42 | android:theme="@style/Theme.AppCompat.NoActionBar" | ||
| 43 | /> | ||
| 44 | <activity android:name=".RegisterActivity" | ||
| 45 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 46 | <activity android:name=".UserActivity" | ||
| 47 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 48 | <activity android:name=".YinsiActivity" | ||
| 49 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 50 | <activity android:name=".QRActivity" | ||
| 51 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 52 | <activity android:name=".AddStudentActivity" | ||
| 53 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 54 | <activity android:name=".NickActivity" | ||
| 55 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 56 | <activity android:name=".SexActivity" | ||
| 57 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 58 | <activity android:name=".NianActivity" | ||
| 59 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 60 | <activity android:name=".ShenActivity" | ||
| 61 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 62 | <activity android:name=".AccountActivity" | ||
| 63 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 64 | |||
| 65 | <activity android:name=".ChangePwdActivity" | ||
| 66 | android:theme="@style/Theme.AppCompat.NoActionBar"/> | ||
| 67 | |||
| 68 | |||
| 69 | </application> | ||
| 70 | |||
| 71 | </manifest> |
app/src/main/java/com/hjx/parent/AccountActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.widget.TextView; | ||
| 4 | |||
| 5 | import com.prws.common.base.BaseActivity; | ||
| 6 | import com.prws.common.base.BasePresenter; | ||
| 7 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 8 | |||
| 9 | public class AccountActivity extends BaseActivity { | ||
| 10 | |||
| 11 | @Override | ||
| 12 | protected int layoutResId() { | ||
| 13 | return R.layout.activity_setac; | ||
| 14 | } | ||
| 15 | |||
| 16 | @Override | ||
| 17 | public Object getContract() { | ||
| 18 | return null; | ||
| 19 | } | ||
| 20 | |||
| 21 | @Override | ||
| 22 | public BasePresenter getPresenter() { | ||
| 23 | return null; | ||
| 24 | } | ||
| 25 | |||
| 26 | |||
| 27 | TextView tv_6; | ||
| 28 | @Override | ||
| 29 | protected void initView() { | ||
| 30 | tv_6 = findViewById(R.id.tv_6); | ||
| 31 | String phone = (String) SharedPreferencesUtil.getData("phone", ""); | ||
| 32 | if (phone != null && phone.length() > 0) | ||
| 33 | tv_6.setText(phone); | ||
| 34 | } | ||
| 35 | |||
| 36 | @Override | ||
| 37 | protected void initListener() { | ||
| 38 | findViewById(R.id.iv_back).setOnClickListener(view -> onBackPressed()); | ||
| 39 | |||
| 40 | findViewById(R.id.tv_7).setOnClickListener(view -> startActivity(ChangePwdActivity.class)); | ||
| 41 | } | ||
| 42 | |||
| 43 | @Override | ||
| 44 | protected void initData() { | ||
| 45 | |||
| 46 | } | ||
| 47 | |||
| 48 | @Override | ||
| 49 | public void onNetChanged(int netWorkState) { | ||
| 50 | |||
| 51 | } | ||
| 52 | } |
app/src/main/java/com/hjx/parent/AddStudentActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.graphics.Color; | ||
| 4 | import android.view.View; | ||
| 5 | import android.widget.Button; | ||
| 6 | import android.widget.TextView; | ||
| 7 | import android.widget.Toast; | ||
| 8 | |||
| 9 | import com.prws.common.base.BaseActivity; | ||
| 10 | import com.prws.common.base.BasePresenter; | ||
| 11 | import com.prws.common.net.NetWorks; | ||
| 12 | import com.prws.common.utils.LogUtil; | ||
| 13 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 14 | |||
| 15 | import org.json.JSONObject; | ||
| 16 | |||
| 17 | import java.util.HashMap; | ||
| 18 | import java.util.Map; | ||
| 19 | |||
| 20 | import io.reactivex.Observer; | ||
| 21 | import io.reactivex.disposables.Disposable; | ||
| 22 | import okhttp3.ResponseBody; | ||
| 23 | |||
| 24 | public class AddStudentActivity extends BaseActivity { | ||
| 25 | @Override | ||
| 26 | protected int layoutResId() { | ||
| 27 | return R.layout.activity_add_stu; | ||
| 28 | } | ||
| 29 | |||
| 30 | @Override | ||
| 31 | public Object getContract() { | ||
| 32 | return null; | ||
| 33 | } | ||
| 34 | |||
| 35 | @Override | ||
| 36 | public BasePresenter getPresenter() { | ||
| 37 | return null; | ||
| 38 | } | ||
| 39 | |||
| 40 | View view_2; | ||
| 41 | View view_3; | ||
| 42 | View view_4; | ||
| 43 | View view_5; | ||
| 44 | Button btn_next; | ||
| 45 | TextView tv_name, tv_sex, tv_nian, tv_shen; | ||
| 46 | |||
| 47 | @Override | ||
| 48 | protected void initView() { | ||
| 49 | view_2 = findViewById(R.id.view_2); | ||
| 50 | view_3 = findViewById(R.id.view_3); | ||
| 51 | view_4 = findViewById(R.id.view_4); | ||
| 52 | view_5 = findViewById(R.id.view_5); | ||
| 53 | tv_name = findViewById(R.id.tv_name); | ||
| 54 | tv_sex = findViewById(R.id.tv_sex); | ||
| 55 | tv_nian = findViewById(R.id.tv_nian); | ||
| 56 | tv_shen = findViewById(R.id.tv_shen); | ||
| 57 | |||
| 58 | |||
| 59 | btn_next = findViewById(R.id.btn_next); | ||
| 60 | } | ||
| 61 | |||
| 62 | boolean isName = false; | ||
| 63 | boolean isSex = false; | ||
| 64 | boolean isNian = false; | ||
| 65 | boolean isShen = false; | ||
| 66 | |||
| 67 | @Override | ||
| 68 | protected void onStart() { | ||
| 69 | super.onStart(); | ||
| 70 | String name = (String) SharedPreferencesUtil.getData("setName", ""); | ||
| 71 | String sex = (String) SharedPreferencesUtil.getData("setSex", ""); | ||
| 72 | String nian = (String) SharedPreferencesUtil.getData("setNian", ""); | ||
| 73 | String shen = (String) SharedPreferencesUtil.getData("setShen", ""); | ||
| 74 | |||
| 75 | if (name != null && name.length() > 0) { | ||
| 76 | tv_name.setText(name); | ||
| 77 | isName = true; | ||
| 78 | } else { | ||
| 79 | isName = false; | ||
| 80 | } | ||
| 81 | if (sex != null && sex.length() > 0) { | ||
| 82 | tv_sex.setText(sex); | ||
| 83 | isSex = true; | ||
| 84 | } else { | ||
| 85 | isSex = false; | ||
| 86 | } | ||
| 87 | if (nian != null && nian.length() > 0) { | ||
| 88 | tv_nian.setText(nian); | ||
| 89 | isNian = true; | ||
| 90 | } else { | ||
| 91 | isNian = false; | ||
| 92 | } | ||
| 93 | if (shen != null && shen.length() > 0) { | ||
| 94 | tv_shen.setText(shen); | ||
| 95 | isShen = true; | ||
| 96 | } else { | ||
| 97 | isShen = false; | ||
| 98 | } | ||
| 99 | |||
| 100 | if (isName && isSex && isNian && isShen) { | ||
| 101 | btn_next.setTextColor(Color.WHITE); | ||
| 102 | btn_next.setBackground(getResources().getDrawable(R.drawable.bg_solid_btn)); | ||
| 103 | } | ||
| 104 | |||
| 105 | } | ||
| 106 | |||
| 107 | @Override | ||
| 108 | protected void initListener() { | ||
| 109 | view_2.setOnClickListener(view -> startActivity(NickActivity.class)); | ||
| 110 | view_3.setOnClickListener(view -> startActivity(SexActivity.class)); | ||
| 111 | view_4.setOnClickListener(view -> startActivity(NianActivity.class)); | ||
| 112 | view_5.setOnClickListener(view -> startActivity(ShenActivity.class)); | ||
| 113 | findViewById(R.id.tv_cancel).setOnClickListener(view -> onBackPressed()); | ||
| 114 | btn_next.setOnClickListener(view -> { | ||
| 115 | if (isName && isSex && isNian && isShen) { | ||
| 116 | addStudent(); | ||
| 117 | } else { | ||
| 118 | Toast.makeText(this, "请完成设置后点击", Toast.LENGTH_SHORT).show(); | ||
| 119 | } | ||
| 120 | }); | ||
| 121 | } | ||
| 122 | |||
| 123 | @Override | ||
| 124 | protected void onDestroy() { | ||
| 125 | super.onDestroy(); | ||
| 126 | SharedPreferencesUtil.putData("setName", ""); | ||
| 127 | SharedPreferencesUtil.putData("setSex", ""); | ||
| 128 | SharedPreferencesUtil.putData("setNian", ""); | ||
| 129 | SharedPreferencesUtil.putData("setShen", ""); | ||
| 130 | SharedPreferencesUtil.putData("setXueq", ""); | ||
| 131 | |||
| 132 | } | ||
| 133 | public void addStudent() { | ||
| 134 | String name = (String) SharedPreferencesUtil.getData("setName", ""); | ||
| 135 | String sex = (String) SharedPreferencesUtil.getData("setSex", ""); | ||
| 136 | String nian = (String) SharedPreferencesUtil.getData("setNian", ""); | ||
| 137 | String shen = (String) SharedPreferencesUtil.getData("setShen", ""); | ||
| 138 | String xueq = (String) SharedPreferencesUtil.getData("setXueq", ""); | ||
| 139 | |||
| 140 | |||
| 141 | Map map = new HashMap(); | ||
| 142 | map.put("nickName", name); | ||
| 143 | map.put("gender", "1"); | ||
| 144 | map.put("gradeId", 1); | ||
| 145 | map.put("parentIdentity", shen); | ||
| 146 | map.put("term", xueq); | ||
| 147 | |||
| 148 | |||
| 149 | NetWorks.registerStudent(NetWorks.getMapRequestBody(map), new Observer<ResponseBody>() { | ||
| 150 | @Override | ||
| 151 | public void onSubscribe(Disposable d) { | ||
| 152 | |||
| 153 | } | ||
| 154 | |||
| 155 | @Override | ||
| 156 | public void onNext(ResponseBody responseBody) { | ||
| 157 | try { | ||
| 158 | |||
| 159 | String str = responseBody.string().toString(); | ||
| 160 | LogUtil.e(TAG, "----" + str); | ||
| 161 | JSONObject jo = new JSONObject(str); | ||
| 162 | boolean isSucceed = jo.getBoolean("success"); | ||
| 163 | if (isSucceed) { | ||
| 164 | finish(); | ||
| 165 | } else { | ||
| 166 | Toast.makeText(AddStudentActivity.this, jo.getString("msg"), Toast.LENGTH_SHORT).show(); | ||
| 167 | } | ||
| 168 | } catch (Exception e) { | ||
| 169 | e.printStackTrace(); | ||
| 170 | Toast.makeText(AddStudentActivity.this, "服务繁忙,请重试", Toast.LENGTH_SHORT).show(); | ||
| 171 | } | ||
| 172 | |||
| 173 | } | ||
| 174 | |||
| 175 | @Override | ||
| 176 | public void onError(Throwable e) { | ||
| 177 | |||
| 178 | } | ||
| 179 | |||
| 180 | @Override | ||
| 181 | public void onComplete() { | ||
| 182 | |||
| 183 | } | ||
| 184 | |||
| 185 | }); | ||
| 186 | } | ||
| 187 | |||
| 188 | @Override | ||
| 189 | protected void initData() { | ||
| 190 | |||
| 191 | } | ||
| 192 | |||
| 193 | @Override | ||
| 194 | public void onNetChanged(int netWorkState) { | ||
| 195 | |||
| 196 | } | ||
| 197 | } | ||
| 198 |
app/src/main/java/com/hjx/parent/ChangePwdActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.widget.EditText; | ||
| 4 | import android.widget.TextView; | ||
| 5 | import android.widget.Toast; | ||
| 6 | |||
| 7 | import com.prws.common.base.BaseActivity; | ||
| 8 | import com.prws.common.base.BasePresenter; | ||
| 9 | import com.prws.common.net.NetWorks; | ||
| 10 | import com.prws.common.utils.LogUtil; | ||
| 11 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 12 | |||
| 13 | import org.json.JSONObject; | ||
| 14 | |||
| 15 | import java.util.HashMap; | ||
| 16 | import java.util.Map; | ||
| 17 | |||
| 18 | import io.reactivex.Observer; | ||
| 19 | import io.reactivex.disposables.Disposable; | ||
| 20 | import okhttp3.ResponseBody; | ||
| 21 | |||
| 22 | public class ChangePwdActivity extends BaseActivity { | ||
| 23 | |||
| 24 | @Override | ||
| 25 | protected int layoutResId() { | ||
| 26 | return R.layout.activity_changem; | ||
| 27 | } | ||
| 28 | |||
| 29 | @Override | ||
| 30 | public Object getContract() { | ||
| 31 | return null; | ||
| 32 | } | ||
| 33 | |||
| 34 | @Override | ||
| 35 | public BasePresenter getPresenter() { | ||
| 36 | return null; | ||
| 37 | } | ||
| 38 | |||
| 39 | |||
| 40 | |||
| 41 | EditText et_pwd; | ||
| 42 | @Override | ||
| 43 | protected void initView() { | ||
| 44 | |||
| 45 | |||
| 46 | et_pwd = findViewById(R.id.et_pwd); | ||
| 47 | } | ||
| 48 | |||
| 49 | @Override | ||
| 50 | protected void initListener() { | ||
| 51 | findViewById(R.id.iv_back).setOnClickListener(view -> onBackPressed()); | ||
| 52 | |||
| 53 | findViewById(R.id.btn_next).setOnClickListener(view -> { | ||
| 54 | String pwd = et_pwd.getText().toString().trim(); | ||
| 55 | if (pwd == null || pwd.length() == 0){ | ||
| 56 | Toast.makeText(this,"密码不能为空",Toast.LENGTH_SHORT).show(); | ||
| 57 | return; | ||
| 58 | } | ||
| 59 | |||
| 60 | changePwd(pwd); | ||
| 61 | |||
| 62 | }); | ||
| 63 | |||
| 64 | } | ||
| 65 | |||
| 66 | public void changePwd(String pwd){ | ||
| 67 | String userId = (String) SharedPreferencesUtil.getData("userId", ""); | ||
| 68 | Map map = new HashMap(); | ||
| 69 | map.put("userId",userId); | ||
| 70 | map.put("password",pwd); | ||
| 71 | |||
| 72 | |||
| 73 | NetWorks.changePassword(NetWorks.getMapRequestBody(map), new Observer<ResponseBody>() { | ||
| 74 | @Override | ||
| 75 | public void onSubscribe(Disposable d) { | ||
| 76 | |||
| 77 | } | ||
| 78 | |||
| 79 | @Override | ||
| 80 | public void onNext(ResponseBody responseBody) { | ||
| 81 | try { | ||
| 82 | |||
| 83 | String str = responseBody.string().toString(); | ||
| 84 | |||
| 85 | |||
| 86 | LogUtil.e(TAG,"----"+str); | ||
| 87 | JSONObject jo = new JSONObject(str); | ||
| 88 | boolean isSucceed = jo.getBoolean("success"); | ||
| 89 | if (isSucceed){ | ||
| 90 | Toast.makeText(ChangePwdActivity.this, "修改成功", Toast.LENGTH_SHORT).show(); | ||
| 91 | finish(); | ||
| 92 | |||
| 93 | }else { | ||
| 94 | Toast.makeText(ChangePwdActivity.this, jo.getString("msg"), Toast.LENGTH_SHORT).show(); | ||
| 95 | } | ||
| 96 | }catch (Exception e){ | ||
| 97 | e.printStackTrace(); | ||
| 98 | Toast.makeText(ChangePwdActivity.this,"服务繁忙,请重试",Toast.LENGTH_SHORT).show(); | ||
| 99 | } | ||
| 100 | |||
| 101 | } | ||
| 102 | |||
| 103 | @Override | ||
| 104 | public void onError(Throwable e) { | ||
| 105 | |||
| 106 | } | ||
| 107 | |||
| 108 | @Override | ||
| 109 | public void onComplete() { | ||
| 110 | |||
| 111 | } | ||
| 112 | }); | ||
| 113 | |||
| 114 | } | ||
| 115 | |||
| 116 | @Override | ||
| 117 | protected void initData() { | ||
| 118 | |||
| 119 | } | ||
| 120 | |||
| 121 | @Override | ||
| 122 | public void onNetChanged(int netWorkState) { | ||
| 123 | |||
| 124 | } | ||
| 125 | } |
app/src/main/java/com/hjx/parent/LoginActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.os.Bundle; | ||
| 4 | import android.telephony.PhoneNumberUtils; | ||
| 5 | import android.text.InputType; | ||
| 6 | import android.widget.Button; | ||
| 7 | import android.widget.CheckBox; | ||
| 8 | import android.widget.EditText; | ||
| 9 | import android.widget.ImageView; | ||
| 10 | import android.widget.TextView; | ||
| 11 | import android.widget.Toast; | ||
| 12 | |||
| 13 | import androidx.appcompat.app.AppCompatActivity; | ||
| 14 | |||
| 15 | import com.prws.common.base.BaseActivity; | ||
| 16 | import com.prws.common.base.BasePresenter; | ||
| 17 | import com.prws.common.bean.BaseEntity; | ||
| 18 | import com.prws.common.net.NetWorks; | ||
| 19 | import com.prws.common.utils.LogUtil; | ||
| 20 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 21 | import com.prws.common.utils.acmanager.ActivityManager; | ||
| 22 | |||
| 23 | import org.json.JSONObject; | ||
| 24 | |||
| 25 | import java.io.IOException; | ||
| 26 | import java.util.HashMap; | ||
| 27 | import java.util.Map; | ||
| 28 | |||
| 29 | import io.reactivex.Observer; | ||
| 30 | import io.reactivex.disposables.Disposable; | ||
| 31 | import okhttp3.ResponseBody; | ||
| 32 | |||
| 33 | |||
| 34 | public class LoginActivity extends BaseActivity { | ||
| 35 | |||
| 36 | |||
| 37 | EditText et_phone; | ||
| 38 | EditText et_pwd; | ||
| 39 | ImageView iv_show; | ||
| 40 | ImageView iv_delete; | ||
| 41 | Button btn_login; | ||
| 42 | TextView tv_reg; | ||
| 43 | CheckBox cb_1; | ||
| 44 | TextView tv_user; | ||
| 45 | TextView tv_ys; | ||
| 46 | |||
| 47 | |||
| 48 | |||
| 49 | @Override | ||
| 50 | protected int layoutResId() { | ||
| 51 | return R.layout.activity_login; | ||
| 52 | } | ||
| 53 | |||
| 54 | @Override | ||
| 55 | public Object getContract() { | ||
| 56 | return null; | ||
| 57 | } | ||
| 58 | |||
| 59 | @Override | ||
| 60 | public BasePresenter getPresenter() { | ||
| 61 | return null; | ||
| 62 | } | ||
| 63 | |||
| 64 | |||
| 65 | @Override | ||
| 66 | protected void initView() { | ||
| 67 | et_phone = findViewById(R.id.et_phone); | ||
| 68 | et_pwd = findViewById(R.id.et_pwd); | ||
| 69 | iv_show = findViewById(R.id.iv_4); | ||
| 70 | iv_delete = findViewById(R.id.iv_2); | ||
| 71 | btn_login = findViewById(R.id.btn_1); | ||
| 72 | tv_reg = findViewById(R.id.tv_2); | ||
| 73 | cb_1 = findViewById(R.id.cb_1); | ||
| 74 | tv_user = findViewById(R.id.tv_4); | ||
| 75 | tv_ys = findViewById(R.id.tv_6); | ||
| 76 | |||
| 77 | |||
| 78 | String role = (String) SharedPreferencesUtil.getData("role",""); | ||
| 79 | |||
| 80 | if (role != null && role.length()> 0){ | ||
| 81 | LogUtil.e(TAG,"role 不是空----"); | ||
| 82 | startActivity(MainActivity.class); | ||
| 83 | finish(); | ||
| 84 | return; | ||
| 85 | }else { | ||
| 86 | LogUtil.e(TAG,"role 是空----"); | ||
| 87 | } | ||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | } | ||
| 93 | |||
| 94 | @Override | ||
| 95 | protected void initListener() { | ||
| 96 | iv_delete.setOnClickListener(view -> { | ||
| 97 | et_phone.setText(""); | ||
| 98 | }); | ||
| 99 | iv_show.setOnClickListener(view -> { | ||
| 100 | |||
| 101 | if (iv_show.getBackground().getConstantState().equals(getDrawable(R.mipmap.xs).getConstantState())){ | ||
| 102 | iv_show.setBackgroundResource(R.mipmap.yc); | ||
| 103 | et_pwd.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); | ||
| 104 | }else { | ||
| 105 | iv_show.setBackgroundResource(R.mipmap.xs); | ||
| 106 | et_pwd.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); | ||
| 107 | } | ||
| 108 | |||
| 109 | |||
| 110 | }); | ||
| 111 | |||
| 112 | |||
| 113 | btn_login.setOnClickListener(view -> { | ||
| 114 | |||
| 115 | String phone = et_phone.getText().toString().trim(); | ||
| 116 | String pwd = et_pwd.getText().toString().trim(); | ||
| 117 | if (phone.isEmpty() || pwd.isEmpty() || phone.length() == 0 || pwd.length() == 0){ | ||
| 118 | Toast.makeText(this,"手机号以及密码不能为空",Toast.LENGTH_SHORT).show(); | ||
| 119 | return; | ||
| 120 | } | ||
| 121 | |||
| 122 | if (!PhoneNumberUtils.isGlobalPhoneNumber(et_phone.getText().toString())){ | ||
| 123 | Toast.makeText(this,"请输入正确的手机号码",Toast.LENGTH_SHORT).show(); | ||
| 124 | return; | ||
| 125 | } | ||
| 126 | |||
| 127 | if (!cb_1.isChecked()){ | ||
| 128 | Toast.makeText(this,"请勾选协议",Toast.LENGTH_SHORT).show(); | ||
| 129 | return; | ||
| 130 | } | ||
| 131 | |||
| 132 | login(phone,pwd); | ||
| 133 | |||
| 134 | }); | ||
| 135 | |||
| 136 | tv_reg.setOnClickListener(view -> { | ||
| 137 | startActivity(RegisterActivity.class); | ||
| 138 | finish(); | ||
| 139 | }); | ||
| 140 | |||
| 141 | tv_ys.setOnClickListener(view -> { | ||
| 142 | startActivity(YinsiActivity.class); | ||
| 143 | }); | ||
| 144 | tv_user.setOnClickListener(view -> { | ||
| 145 | startActivity(UserActivity.class); | ||
| 146 | }); | ||
| 147 | } | ||
| 148 | |||
| 149 | public void login(final String phone ,String pwd){ | ||
| 150 | |||
| 151 | Map map = new HashMap(); | ||
| 152 | map.put("username",phone); | ||
| 153 | map.put("password",pwd); | ||
| 154 | |||
| 155 | |||
| 156 | NetWorks.login(NetWorks.getMapRequestBody(map), new Observer<ResponseBody>() { | ||
| 157 | @Override | ||
| 158 | public void onSubscribe(Disposable d) { | ||
| 159 | |||
| 160 | } | ||
| 161 | |||
| 162 | @Override | ||
| 163 | public void onNext(ResponseBody responseBody) { | ||
| 164 | try { | ||
| 165 | |||
| 166 | String str = responseBody.string().toString(); | ||
| 167 | |||
| 168 | |||
| 169 | LogUtil.e(TAG,"----"+str); | ||
| 170 | JSONObject jo = new JSONObject(str); | ||
| 171 | boolean isSucceed = jo.getBoolean("success"); | ||
| 172 | if (isSucceed){ | ||
| 173 | JSONObject jo2 = jo.getJSONObject("data"); | ||
| 174 | SharedPreferencesUtil.putData("phone",phone); | ||
| 175 | SharedPreferencesUtil.putData("role",jo2.getString("role")); | ||
| 176 | SharedPreferencesUtil.putData("userId",jo2.getString("userId")); | ||
| 177 | SharedPreferencesUtil.putData("token",jo2.getString("token")); | ||
| 178 | |||
| 179 | startActivity(MainActivity.class); | ||
| 180 | |||
| 181 | }else { | ||
| 182 | Toast.makeText(LoginActivity.this, jo.getString("msg"), Toast.LENGTH_SHORT).show(); | ||
| 183 | } | ||
| 184 | }catch (Exception e){ | ||
| 185 | e.printStackTrace(); | ||
| 186 | Toast.makeText(LoginActivity.this,"服务繁忙,请重试",Toast.LENGTH_SHORT).show(); | ||
| 187 | } | ||
| 188 | |||
| 189 | } | ||
| 190 | |||
| 191 | @Override | ||
| 192 | public void onError(Throwable e) { | ||
| 193 | |||
| 194 | } | ||
| 195 | |||
| 196 | @Override | ||
| 197 | public void onComplete() { | ||
| 198 | |||
| 199 | } | ||
| 200 | }); | ||
| 201 | } | ||
| 202 | |||
| 203 | |||
| 204 | @Override | ||
| 205 | protected void initData() { | ||
| 206 | |||
| 207 | } | ||
| 208 | |||
| 209 | @Override | ||
| 210 | public void onNetChanged(int netWorkState) { | ||
| 211 | |||
| 212 | } | ||
| 213 | } |
app/src/main/java/com/hjx/parent/MainActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import androidx.appcompat.app.AppCompatActivity; | ||
| 4 | import androidx.constraintlayout.widget.ConstraintLayout; | ||
| 5 | |||
| 6 | import android.graphics.Color; | ||
| 7 | import android.os.Bundle; | ||
| 8 | import android.widget.ImageView; | ||
| 9 | import android.widget.TextView; | ||
| 10 | |||
| 11 | import com.hjx.parent.fragment.HomeFragment; | ||
| 12 | import com.hjx.parent.fragment.MeFragment; | ||
| 13 | import com.prws.common.base.BaseActivity; | ||
| 14 | import com.prws.common.base.BasePresenter; | ||
| 15 | |||
| 16 | public class MainActivity extends BaseActivity { | ||
| 17 | |||
| 18 | @Override | ||
| 19 | protected int layoutResId() { | ||
| 20 | return R.layout.activity_main; | ||
| 21 | } | ||
| 22 | |||
| 23 | @Override | ||
| 24 | public Object getContract() { | ||
| 25 | return null; | ||
| 26 | } | ||
| 27 | |||
| 28 | @Override | ||
| 29 | public BasePresenter getPresenter() { | ||
| 30 | return null; | ||
| 31 | } | ||
| 32 | |||
| 33 | |||
| 34 | |||
| 35 | |||
| 36 | HomeFragment homeFragment; | ||
| 37 | MeFragment meFragment; | ||
| 38 | ConstraintLayout cl_home; | ||
| 39 | ConstraintLayout cl_me; | ||
| 40 | ImageView iv_3,iv_4; | ||
| 41 | TextView tv_1,tv_4; | ||
| 42 | |||
| 43 | @Override | ||
| 44 | protected void initView() { | ||
| 45 | showFragment(getHomeFragment(),R.id.rl_content); | ||
| 46 | cl_home = findViewById(R.id.cl_home); | ||
| 47 | cl_me = findViewById(R.id.cl_me); | ||
| 48 | iv_3 = findViewById(R.id.iv_3); | ||
| 49 | iv_4 = findViewById(R.id.iv_4); | ||
| 50 | tv_1 = findViewById(R.id.tv_1); | ||
| 51 | tv_4 = findViewById(R.id.tv_4); | ||
| 52 | |||
| 53 | |||
| 54 | iv_3.setBackgroundResource(R.mipmap.hoss); | ||
| 55 | tv_1.setTextColor(Color.parseColor("#FE5E09")); | ||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | } | ||
| 60 | |||
| 61 | public HomeFragment getHomeFragment(){ | ||
| 62 | if (homeFragment == null) | ||
| 63 | homeFragment = new HomeFragment(); | ||
| 64 | return homeFragment; | ||
| 65 | } | ||
| 66 | |||
| 67 | public MeFragment getMeFragment(){ | ||
| 68 | if (meFragment == null) | ||
| 69 | meFragment = new MeFragment(); | ||
| 70 | return meFragment; | ||
| 71 | } | ||
| 72 | |||
| 73 | |||
| 74 | |||
| 75 | @Override | ||
| 76 | protected void initListener() { | ||
| 77 | cl_home.setOnClickListener(view -> { | ||
| 78 | showFragment(getHomeFragment(),R.id.rl_content); | ||
| 79 | iv_3.setBackgroundResource(R.mipmap.hoss); | ||
| 80 | tv_1.setTextColor(Color.parseColor("#FE5E09")); | ||
| 81 | |||
| 82 | |||
| 83 | iv_4.setBackgroundResource(R.mipmap.wmus); | ||
| 84 | tv_4.setTextColor(Color.parseColor("#333333")); | ||
| 85 | |||
| 86 | |||
| 87 | }); | ||
| 88 | |||
| 89 | cl_me.setOnClickListener(view -> { | ||
| 90 | showFragment(getMeFragment(),R.id.rl_content); | ||
| 91 | |||
| 92 | iv_3.setBackgroundResource(R.mipmap.hous); | ||
| 93 | tv_1.setTextColor(Color.parseColor("#333333")); | ||
| 94 | |||
| 95 | |||
| 96 | iv_4.setBackgroundResource(R.mipmap.wmss); | ||
| 97 | tv_4.setTextColor(Color.parseColor("#FE5E09")); | ||
| 98 | |||
| 99 | |||
| 100 | }); | ||
| 101 | } | ||
| 102 | |||
| 103 | @Override | ||
| 104 | protected void initData() { | ||
| 105 | |||
| 106 | } | ||
| 107 | |||
| 108 | @Override | ||
| 109 | public void onNetChanged(int netWorkState) { | ||
| 110 | |||
| 111 | } | ||
| 112 | } |
app/src/main/java/com/hjx/parent/MyApplication.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import com.prws.common.CommonApplication; | ||
| 4 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 5 | import com.uuzuche.lib_zxing.activity.ZXingLibrary; | ||
| 6 | |||
| 7 | public class MyApplication extends CommonApplication { | ||
| 8 | |||
| 9 | @Override | ||
| 10 | public void onCreate() { | ||
| 11 | super.onCreate(); | ||
| 12 | |||
| 13 | SharedPreferencesUtil.getInstance(this,"config"); | ||
| 14 | |||
| 15 | ZXingLibrary.initDisplayOpinion(this); | ||
| 16 | |||
| 17 | } | ||
| 18 | } | ||
| 19 |
app/src/main/java/com/hjx/parent/NianActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.widget.TextView; | ||
| 4 | |||
| 5 | import com.prws.common.base.BaseActivity; | ||
| 6 | import com.prws.common.base.BasePresenter; | ||
| 7 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 8 | |||
| 9 | public class NianActivity extends BaseActivity { | ||
| 10 | @Override | ||
| 11 | protected int layoutResId() { | ||
| 12 | return R.layout.activity_set_nian; | ||
| 13 | } | ||
| 14 | |||
| 15 | @Override | ||
| 16 | public Object getContract() { | ||
| 17 | return null; | ||
| 18 | } | ||
| 19 | |||
| 20 | @Override | ||
| 21 | public BasePresenter getPresenter() { | ||
| 22 | return null; | ||
| 23 | } | ||
| 24 | |||
| 25 | TextView tv_nian; | ||
| 26 | TextView tv_xq; | ||
| 27 | |||
| 28 | @Override | ||
| 29 | protected void initView() { | ||
| 30 | tv_nian = findViewById(R.id.tv_nian); | ||
| 31 | tv_xq = findViewById(R.id.tv_xq); | ||
| 32 | findViewById(R.id.tv_cancel).setOnClickListener(view -> onBackPressed()); | ||
| 33 | findViewById(R.id.tv_ok).setOnClickListener(view -> { | ||
| 34 | SharedPreferencesUtil.putData("setNian", tv_nian.getText()); | ||
| 35 | SharedPreferencesUtil.putData("setXueq", tv_xq.getText()); | ||
| 36 | finish(); | ||
| 37 | }); | ||
| 38 | |||
| 39 | |||
| 40 | } | ||
| 41 | |||
| 42 | @Override | ||
| 43 | protected void initListener() { | ||
| 44 | |||
| 45 | } | ||
| 46 | |||
| 47 | @Override | ||
| 48 | protected void initData() { | ||
| 49 | |||
| 50 | } | ||
| 51 | |||
| 52 | @Override | ||
| 53 | public void onNetChanged(int netWorkState) { | ||
| 54 | |||
| 55 | } | ||
| 56 | } | ||
| 57 |
app/src/main/java/com/hjx/parent/NickActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.widget.EditText; | ||
| 4 | import android.widget.TextView; | ||
| 5 | import android.widget.Toast; | ||
| 6 | |||
| 7 | import com.prws.common.base.BaseActivity; | ||
| 8 | import com.prws.common.base.BasePresenter; | ||
| 9 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 10 | |||
| 11 | public class NickActivity extends BaseActivity { | ||
| 12 | @Override | ||
| 13 | protected int layoutResId() { | ||
| 14 | return R.layout.activity_set_nick; | ||
| 15 | } | ||
| 16 | |||
| 17 | @Override | ||
| 18 | public Object getContract() { | ||
| 19 | return null; | ||
| 20 | } | ||
| 21 | |||
| 22 | @Override | ||
| 23 | public BasePresenter getPresenter() { | ||
| 24 | return null; | ||
| 25 | } | ||
| 26 | |||
| 27 | EditText et_1; | ||
| 28 | |||
| 29 | @Override | ||
| 30 | protected void initView() { | ||
| 31 | et_1 = findViewById(R.id.et_1); | ||
| 32 | findViewById(R.id.tv_cancel).setOnClickListener(view -> onBackPressed()); | ||
| 33 | findViewById(R.id.tv_ok).setOnClickListener(view -> { | ||
| 34 | String name = et_1.getText().toString().trim(); | ||
| 35 | if (name != null && name.length() > 0){ | ||
| 36 | SharedPreferencesUtil.putData("setName",name); | ||
| 37 | finish(); | ||
| 38 | }else { | ||
| 39 | Toast.makeText(this,"请设置昵称",Toast.LENGTH_SHORT).show(); | ||
| 40 | } | ||
| 41 | }); | ||
| 42 | } | ||
| 43 | |||
| 44 | @Override | ||
| 45 | protected void initListener() { | ||
| 46 | |||
| 47 | } | ||
| 48 | |||
| 49 | @Override | ||
| 50 | protected void initData() { | ||
| 51 | |||
| 52 | } | ||
| 53 | |||
| 54 | @Override | ||
| 55 | public void onNetChanged(int netWorkState) { | ||
| 56 | |||
| 57 | } | ||
| 58 | } | ||
| 59 |
app/src/main/java/com/hjx/parent/QRActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.graphics.Bitmap; | ||
| 4 | import android.widget.Toast; | ||
| 5 | |||
| 6 | import com.google.gson.Gson; | ||
| 7 | import com.hjx.parent.bean.RegisterBean; | ||
| 8 | import com.prws.common.base.BaseActivity; | ||
| 9 | import com.prws.common.base.BasePresenter; | ||
| 10 | import com.prws.common.net.NetWorks; | ||
| 11 | import com.prws.common.utils.LogUtil; | ||
| 12 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 13 | import com.uuzuche.lib_zxing.activity.CaptureFragment; | ||
| 14 | import com.uuzuche.lib_zxing.activity.CodeUtils; | ||
| 15 | |||
| 16 | import org.json.JSONObject; | ||
| 17 | |||
| 18 | import java.io.IOException; | ||
| 19 | |||
| 20 | import io.reactivex.Observer; | ||
| 21 | import io.reactivex.disposables.Disposable; | ||
| 22 | import okhttp3.ResponseBody; | ||
| 23 | |||
| 24 | public class QRActivity extends BaseActivity { | ||
| 25 | @Override | ||
| 26 | protected int layoutResId() { | ||
| 27 | return R.layout.activity_qr; | ||
| 28 | } | ||
| 29 | |||
| 30 | @Override | ||
| 31 | public Object getContract() { | ||
| 32 | return null; | ||
| 33 | } | ||
| 34 | |||
| 35 | @Override | ||
| 36 | public BasePresenter getPresenter() { | ||
| 37 | return null; | ||
| 38 | } | ||
| 39 | |||
| 40 | @Override | ||
| 41 | protected void initView() { | ||
| 42 | |||
| 43 | findViewById(R.id.iv_back).setOnClickListener(view -> startActivity(MainActivity.class)); | ||
| 44 | |||
| 45 | CaptureFragment captureFragment = new CaptureFragment(); | ||
| 46 | |||
| 47 | captureFragment.setAnalyzeCallback(new CodeUtils.AnalyzeCallback() { | ||
| 48 | @Override | ||
| 49 | public void onAnalyzeSuccess(Bitmap mBitmap, String result) { | ||
| 50 | LogUtil.e(TAG,"result----:"+result); | ||
| 51 | |||
| 52 | loginAnd(result); | ||
| 53 | |||
| 54 | } | ||
| 55 | |||
| 56 | @Override | ||
| 57 | public void onAnalyzeFailed() { | ||
| 58 | |||
| 59 | } | ||
| 60 | }); | ||
| 61 | |||
| 62 | |||
| 63 | getSupportFragmentManager().beginTransaction().replace(R.id.rl_content, captureFragment).commit(); | ||
| 64 | |||
| 65 | |||
| 66 | } | ||
| 67 | |||
| 68 | public void loginAnd(String str){ | ||
| 69 | NetWorks.scanAndLogin(str, new Observer<ResponseBody>() { | ||
| 70 | @Override | ||
| 71 | public void onSubscribe(Disposable d) { | ||
| 72 | |||
| 73 | } | ||
| 74 | |||
| 75 | @Override | ||
| 76 | public void onNext(ResponseBody responseBody) { | ||
| 77 | try { | ||
| 78 | |||
| 79 | String str = responseBody.string().toString(); | ||
| 80 | LogUtil.e(TAG,"----"+str); | ||
| 81 | JSONObject jo = new JSONObject(str); | ||
| 82 | boolean isSucceed = jo.getBoolean("success"); | ||
| 83 | if (isSucceed){ | ||
| 84 | startActivity(MainActivity.class); | ||
| 85 | finish(); | ||
| 86 | }else { | ||
| 87 | Toast.makeText(QRActivity.this, jo.getString("msg"), Toast.LENGTH_SHORT).show(); | ||
| 88 | } | ||
| 89 | }catch (Exception e){ | ||
| 90 | e.printStackTrace(); | ||
| 91 | Toast.makeText(QRActivity.this,"服务繁忙,请重试",Toast.LENGTH_SHORT).show(); | ||
| 92 | startActivity(MainActivity.class); | ||
| 93 | } | ||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | |||
| 99 | } | ||
| 100 | |||
| 101 | @Override | ||
| 102 | public void onError(Throwable e) { | ||
| 103 | |||
| 104 | } | ||
| 105 | |||
| 106 | @Override | ||
| 107 | public void onComplete() { | ||
| 108 | |||
| 109 | } | ||
| 110 | }); | ||
| 111 | } | ||
| 112 | |||
| 113 | @Override | ||
| 114 | protected void initListener() { | ||
| 115 | |||
| 116 | } | ||
| 117 | |||
| 118 | @Override | ||
| 119 | protected void initData() { | ||
| 120 | |||
| 121 | } | ||
| 122 | |||
| 123 | @Override | ||
| 124 | public void onNetChanged(int netWorkState) { | ||
| 125 | |||
| 126 | } | ||
| 127 | } | ||
| 128 |
app/src/main/java/com/hjx/parent/RegisterActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.content.Intent; | ||
| 4 | import android.os.Bundle; | ||
| 5 | import android.telephony.PhoneNumberUtils; | ||
| 6 | import android.text.InputType; | ||
| 7 | import android.widget.Button; | ||
| 8 | import android.widget.CheckBox; | ||
| 9 | import android.widget.EditText; | ||
| 10 | import android.widget.ImageView; | ||
| 11 | import android.widget.TextView; | ||
| 12 | import android.widget.Toast; | ||
| 13 | |||
| 14 | import androidx.annotation.Nullable; | ||
| 15 | |||
| 16 | import com.google.gson.Gson; | ||
| 17 | import com.hjq.permissions.OnPermissionCallback; | ||
| 18 | import com.hjq.permissions.Permission; | ||
| 19 | import com.hjq.permissions.XXPermissions; | ||
| 20 | import com.hjx.parent.bean.RegisterBean; | ||
| 21 | import com.prws.common.base.BaseActivity; | ||
| 22 | import com.prws.common.base.BasePresenter; | ||
| 23 | import com.prws.common.bean.BaseEntity; | ||
| 24 | import com.prws.common.net.NetWorks; | ||
| 25 | import com.prws.common.utils.GsonUtil; | ||
| 26 | import com.prws.common.utils.LogUtil; | ||
| 27 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 28 | import com.uuzuche.lib_zxing.activity.CaptureActivity; | ||
| 29 | import com.uuzuche.lib_zxing.activity.CodeUtils; | ||
| 30 | |||
| 31 | import java.io.IOException; | ||
| 32 | import java.util.HashMap; | ||
| 33 | import java.util.List; | ||
| 34 | import java.util.Map; | ||
| 35 | |||
| 36 | import io.reactivex.Observer; | ||
| 37 | import io.reactivex.disposables.Disposable; | ||
| 38 | import okhttp3.ResponseBody; | ||
| 39 | |||
| 40 | public class RegisterActivity extends BaseActivity { | ||
| 41 | |||
| 42 | EditText et_phone; | ||
| 43 | EditText et_pwd; | ||
| 44 | EditText et_pwd_2; | ||
| 45 | ImageView iv_show; | ||
| 46 | ImageView iv_show_2; | ||
| 47 | ImageView iv_delete; | ||
| 48 | Button btn_reg; | ||
| 49 | TextView tv_log; | ||
| 50 | CheckBox cb_1; | ||
| 51 | TextView tv_user; | ||
| 52 | TextView tv_ys; | ||
| 53 | |||
| 54 | |||
| 55 | @Override | ||
| 56 | protected int layoutResId() { | ||
| 57 | return R.layout.activity_register; | ||
| 58 | } | ||
| 59 | |||
| 60 | @Override | ||
| 61 | public Object getContract() { | ||
| 62 | return null; | ||
| 63 | } | ||
| 64 | |||
| 65 | @Override | ||
| 66 | public BasePresenter getPresenter() { | ||
| 67 | return null; | ||
| 68 | } | ||
| 69 | |||
| 70 | @Override | ||
| 71 | protected void initView() { | ||
| 72 | et_phone = findViewById(R.id.et_phone); | ||
| 73 | et_pwd = findViewById(R.id.et_pwd); | ||
| 74 | iv_show = findViewById(R.id.iv_4); | ||
| 75 | iv_show_2 = findViewById(R.id.iv_6); | ||
| 76 | et_pwd_2 = findViewById(R.id.et_pwd_2); | ||
| 77 | iv_delete = findViewById(R.id.iv_2); | ||
| 78 | btn_reg = findViewById(R.id.btn_1); | ||
| 79 | tv_log = findViewById(R.id.tv_2); | ||
| 80 | cb_1 = findViewById(R.id.cb_1); | ||
| 81 | tv_user = findViewById(R.id.tv_4); | ||
| 82 | tv_ys = findViewById(R.id.tv_6); | ||
| 83 | |||
| 84 | |||
| 85 | } | ||
| 86 | |||
| 87 | @Override | ||
| 88 | protected void initListener() { | ||
| 89 | iv_delete.setOnClickListener(view -> { | ||
| 90 | et_phone.setText(""); | ||
| 91 | }); | ||
| 92 | iv_show.setOnClickListener(view -> { | ||
| 93 | |||
| 94 | if (iv_show.getBackground().getConstantState().equals(getDrawable(R.mipmap.xs).getConstantState())) { | ||
| 95 | iv_show.setBackgroundResource(R.mipmap.yc); | ||
| 96 | et_pwd.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); | ||
| 97 | } else { | ||
| 98 | iv_show.setBackgroundResource(R.mipmap.xs); | ||
| 99 | et_pwd.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); | ||
| 100 | } | ||
| 101 | |||
| 102 | |||
| 103 | }); | ||
| 104 | |||
| 105 | iv_show_2.setOnClickListener(view -> { | ||
| 106 | |||
| 107 | if (iv_show_2.getBackground().getConstantState().equals(getDrawable(R.mipmap.xs).getConstantState())) { | ||
| 108 | iv_show_2.setBackgroundResource(R.mipmap.yc); | ||
| 109 | et_pwd_2.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); | ||
| 110 | } else { | ||
| 111 | iv_show_2.setBackgroundResource(R.mipmap.xs); | ||
| 112 | et_pwd_2.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); | ||
| 113 | } | ||
| 114 | |||
| 115 | |||
| 116 | }); | ||
| 117 | |||
| 118 | |||
| 119 | btn_reg.setOnClickListener(view -> { | ||
| 120 | |||
| 121 | String phone = et_phone.getText().toString().trim(); | ||
| 122 | String pwd = et_pwd.getText().toString().trim(); | ||
| 123 | String pwd2 = et_pwd_2.getText().toString().trim(); | ||
| 124 | if (phone.isEmpty() || pwd.isEmpty() || phone.length() == 0 || pwd.length() == 0) { | ||
| 125 | Toast.makeText(this, "手机号以及密码不能为空", Toast.LENGTH_SHORT).show(); | ||
| 126 | return; | ||
| 127 | } | ||
| 128 | |||
| 129 | if (!PhoneNumberUtils.isGlobalPhoneNumber(et_phone.getText().toString())) { | ||
| 130 | Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_SHORT).show(); | ||
| 131 | return; | ||
| 132 | } | ||
| 133 | |||
| 134 | if (!cb_1.isChecked()) { | ||
| 135 | Toast.makeText(this, "请勾选协议", Toast.LENGTH_SHORT).show(); | ||
| 136 | return; | ||
| 137 | } | ||
| 138 | if (!pwd.equals(pwd2)) { | ||
| 139 | Toast.makeText(this, "两次密码需要一致", Toast.LENGTH_SHORT).show(); | ||
| 140 | return; | ||
| 141 | } | ||
| 142 | |||
| 143 | reg(phone, pwd); | ||
| 144 | |||
| 145 | }); | ||
| 146 | |||
| 147 | tv_log.setOnClickListener(view -> { | ||
| 148 | startActivity(LoginActivity.class); | ||
| 149 | finish(); | ||
| 150 | }); | ||
| 151 | |||
| 152 | tv_ys.setOnClickListener(view -> { | ||
| 153 | startActivity(YinsiActivity.class); | ||
| 154 | }); | ||
| 155 | tv_user.setOnClickListener(view -> { | ||
| 156 | startActivity(UserActivity.class); | ||
| 157 | }); | ||
| 158 | } | ||
| 159 | |||
| 160 | public void reg(final String phone, String pwd) { | ||
| 161 | |||
| 162 | Map map = new HashMap(); | ||
| 163 | map.put("username", phone); | ||
| 164 | map.put("password", pwd); | ||
| 165 | |||
| 166 | |||
| 167 | NetWorks.registerParent(NetWorks.getMapRequestBody(map), new Observer<ResponseBody>() { | ||
| 168 | @Override | ||
| 169 | public void onSubscribe(Disposable d) { | ||
| 170 | |||
| 171 | } | ||
| 172 | |||
| 173 | @Override | ||
| 174 | public void onNext(ResponseBody responseBody) { | ||
| 175 | String str = null; | ||
| 176 | try { | ||
| 177 | str = responseBody.string(); | ||
| 178 | } catch (IOException e) { | ||
| 179 | e.printStackTrace(); | ||
| 180 | } | ||
| 181 | |||
| 182 | if (str == null || str.length() == 0) { | ||
| 183 | Toast.makeText(RegisterActivity.this, "服务器繁忙", Toast.LENGTH_SHORT).show(); | ||
| 184 | return; | ||
| 185 | } | ||
| 186 | |||
| 187 | RegisterBean registerBean = new Gson().fromJson(str, RegisterBean.class); | ||
| 188 | |||
| 189 | if (!registerBean.isSuccess()) { | ||
| 190 | Toast.makeText(RegisterActivity.this, registerBean.getMsg(), Toast.LENGTH_SHORT).show(); | ||
| 191 | return; | ||
| 192 | } | ||
| 193 | |||
| 194 | if (registerBean.getData().getUserName() != null && registerBean.getData().getUserName().length() > 0) { | ||
| 195 | SharedPreferencesUtil.putData("phone",phone); | ||
| 196 | SharedPreferencesUtil.putData("role",registerBean.getData().getUserName()); | ||
| 197 | SharedPreferencesUtil.putData("userId",registerBean.getData().getUserName()); | ||
| 198 | |||
| 199 | //进入扫码界面 | ||
| 200 | goQRView(); | ||
| 201 | |||
| 202 | } | ||
| 203 | |||
| 204 | |||
| 205 | } | ||
| 206 | |||
| 207 | @Override | ||
| 208 | public void onError(Throwable e) { | ||
| 209 | |||
| 210 | } | ||
| 211 | |||
| 212 | @Override | ||
| 213 | public void onComplete() { | ||
| 214 | |||
| 215 | } | ||
| 216 | }); | ||
| 217 | } | ||
| 218 | |||
| 219 | public void goQRView() { | ||
| 220 | |||
| 221 | if (!XXPermissions.isGranted(this, Permission.CAMERA)) { | ||
| 222 | XXPermissions.with(this) | ||
| 223 | // 申请多个权限 | ||
| 224 | .permission(Permission.CAMERA) | ||
| 225 | .request(new OnPermissionCallback() { | ||
| 226 | @Override | ||
| 227 | public void onGranted(List<String> permissions, boolean all) { | ||
| 228 | if (all) { | ||
| 229 | //开启扫码界面 | ||
| 230 | startQRView(); | ||
| 231 | |||
| 232 | } else { | ||
| 233 | Toast.makeText(RegisterActivity.this, "需要相机权限", Toast.LENGTH_SHORT).show(); | ||
| 234 | } | ||
| 235 | } | ||
| 236 | |||
| 237 | @Override | ||
| 238 | public void onDenied(List<String> permissions, boolean never) { | ||
| 239 | XXPermissions.startPermissionActivity(RegisterActivity.this, permissions); | ||
| 240 | } | ||
| 241 | }); | ||
| 242 | |||
| 243 | |||
| 244 | } else { | ||
| 245 | startQRView(); | ||
| 246 | } | ||
| 247 | |||
| 248 | |||
| 249 | } | ||
| 250 | |||
| 251 | public void startQRView() { | ||
| 252 | |||
| 253 | startActivity(QRActivity.class); | ||
| 254 | finish(); | ||
| 255 | |||
| 256 | } | ||
| 257 | |||
| 258 | |||
| 259 | |||
| 260 | @Override | ||
| 261 | protected void initData() { | ||
| 262 | |||
| 263 | } | ||
| 264 | |||
| 265 | @Override | ||
| 266 | public void onNetChanged(int netWorkState) { | ||
| 267 | |||
| 268 | } | ||
| 269 | } |
app/src/main/java/com/hjx/parent/SexActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.view.View; | ||
| 4 | import android.widget.ImageView; | ||
| 5 | |||
| 6 | import com.prws.common.base.BaseActivity; | ||
| 7 | import com.prws.common.base.BasePresenter; | ||
| 8 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 9 | |||
| 10 | public class SexActivity extends BaseActivity { | ||
| 11 | @Override | ||
| 12 | protected int layoutResId() { | ||
| 13 | return R.layout.activity_set_sex; | ||
| 14 | } | ||
| 15 | |||
| 16 | @Override | ||
| 17 | public Object getContract() { | ||
| 18 | return null; | ||
| 19 | } | ||
| 20 | |||
| 21 | @Override | ||
| 22 | public BasePresenter getPresenter() { | ||
| 23 | return null; | ||
| 24 | } | ||
| 25 | |||
| 26 | View view_nv; | ||
| 27 | View view_nan; | ||
| 28 | boolean isNv = true; | ||
| 29 | ImageView cb_1,cb_2; | ||
| 30 | @Override | ||
| 31 | protected void initView() { | ||
| 32 | view_nv = findViewById(R.id.view_2); | ||
| 33 | view_nan = findViewById(R.id.view_3); | ||
| 34 | cb_1 = findViewById(R.id.cb_1); | ||
| 35 | cb_2 = findViewById(R.id.cb_2); | ||
| 36 | |||
| 37 | findViewById(R.id.tv_cancel).setOnClickListener(view -> onBackPressed()); | ||
| 38 | findViewById(R.id.tv_ok).setOnClickListener(view -> { | ||
| 39 | SharedPreferencesUtil.putData("setSex", isNv?"女":"男"); | ||
| 40 | finish(); | ||
| 41 | }); | ||
| 42 | view_nv.setOnClickListener(view -> { | ||
| 43 | view_nv.setBackgroundResource(R.drawable.bg_solid_white_10_or); | ||
| 44 | view_nan.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 45 | cb_1.setBackgroundResource(R.mipmap.gx); | ||
| 46 | cb_2.setBackgroundResource(R.mipmap.wsyq); | ||
| 47 | isNv = true; | ||
| 48 | }); | ||
| 49 | view_nan.setOnClickListener(view -> { | ||
| 50 | view_nv.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 51 | view_nan.setBackgroundResource(R.drawable.bg_solid_white_10_or); | ||
| 52 | cb_1.setBackgroundResource(R.mipmap.wsyq); | ||
| 53 | cb_2.setBackgroundResource(R.mipmap.gx); | ||
| 54 | isNv = false; | ||
| 55 | }); | ||
| 56 | } | ||
| 57 | |||
| 58 | @Override | ||
| 59 | protected void initListener() { | ||
| 60 | |||
| 61 | } | ||
| 62 | |||
| 63 | @Override | ||
| 64 | protected void initData() { | ||
| 65 | |||
| 66 | } | ||
| 67 | |||
| 68 | @Override | ||
| 69 | public void onNetChanged(int netWorkState) { | ||
| 70 | |||
| 71 | } | ||
| 72 | } | ||
| 73 |
app/src/main/java/com/hjx/parent/ShenActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import android.view.View; | ||
| 4 | import android.widget.ImageView; | ||
| 5 | |||
| 6 | import com.prws.common.base.BaseActivity; | ||
| 7 | import com.prws.common.base.BasePresenter; | ||
| 8 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 9 | |||
| 10 | public class ShenActivity extends BaseActivity { | ||
| 11 | @Override | ||
| 12 | protected int layoutResId() { | ||
| 13 | return R.layout.activity_set_jia; | ||
| 14 | } | ||
| 15 | |||
| 16 | @Override | ||
| 17 | public Object getContract() { | ||
| 18 | return null; | ||
| 19 | } | ||
| 20 | |||
| 21 | @Override | ||
| 22 | public BasePresenter getPresenter() { | ||
| 23 | return null; | ||
| 24 | } | ||
| 25 | View view_1; | ||
| 26 | View view_2,view_3,view_4,view_5,view_6; | ||
| 27 | ImageView iv_1,iv_2,iv_3,iv_4,iv_5,iv_6; | ||
| 28 | |||
| 29 | String shen = "爸爸"; | ||
| 30 | @Override | ||
| 31 | protected void initView() { | ||
| 32 | findViewById(R.id.tv_cancel).setOnClickListener(view -> onBackPressed()); | ||
| 33 | findViewById(R.id.tv_ok).setOnClickListener(view -> { | ||
| 34 | SharedPreferencesUtil.putData("setShen", shen); | ||
| 35 | finish(); | ||
| 36 | }); | ||
| 37 | view_1 = findViewById(R.id.view_2); | ||
| 38 | view_2 = findViewById(R.id.view_3); | ||
| 39 | view_3 = findViewById(R.id.view_4); | ||
| 40 | view_4 = findViewById(R.id.view_5); | ||
| 41 | view_5 = findViewById(R.id.view_6); | ||
| 42 | view_6 = findViewById(R.id.view_7); | ||
| 43 | iv_1 = findViewById(R.id.iv_1); | ||
| 44 | iv_2 = findViewById(R.id.iv_2); | ||
| 45 | iv_3 = findViewById(R.id.iv_3); | ||
| 46 | iv_4 = findViewById(R.id.iv_4); | ||
| 47 | iv_5 = findViewById(R.id.iv_5); | ||
| 48 | iv_6 = findViewById(R.id.iv_6); | ||
| 49 | |||
| 50 | view_1.setOnClickListener(view -> { | ||
| 51 | view_1.setBackgroundResource(R.drawable.bg_solid_white_10_or); | ||
| 52 | view_2.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 53 | view_3.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 54 | view_4.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 55 | view_5.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 56 | view_6.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 57 | iv_1.setBackgroundResource(R.mipmap.gx); | ||
| 58 | iv_2.setBackgroundResource(R.mipmap.wsyq); | ||
| 59 | iv_3.setBackgroundResource(R.mipmap.wsyq); | ||
| 60 | iv_4.setBackgroundResource(R.mipmap.wsyq); | ||
| 61 | iv_5.setBackgroundResource(R.mipmap.wsyq); | ||
| 62 | iv_6.setBackgroundResource(R.mipmap.wsyq); | ||
| 63 | shen = "爸爸"; | ||
| 64 | }); | ||
| 65 | view_2.setOnClickListener(view -> { | ||
| 66 | view_1.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 67 | view_2.setBackgroundResource(R.drawable.bg_solid_white_10_or); | ||
| 68 | view_3.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 69 | view_4.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 70 | view_5.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 71 | view_6.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 72 | shen = "妈妈"; | ||
| 73 | iv_1.setBackgroundResource(R.mipmap.wsyq); | ||
| 74 | iv_2.setBackgroundResource(R.mipmap.gx); | ||
| 75 | iv_3.setBackgroundResource(R.mipmap.wsyq); | ||
| 76 | iv_4.setBackgroundResource(R.mipmap.wsyq); | ||
| 77 | iv_5.setBackgroundResource(R.mipmap.wsyq); | ||
| 78 | iv_6.setBackgroundResource(R.mipmap.wsyq); | ||
| 79 | }); | ||
| 80 | view_3.setOnClickListener(view -> { | ||
| 81 | view_1.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 82 | view_2.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 83 | view_3.setBackgroundResource(R.drawable.bg_solid_white_10_or); | ||
| 84 | view_4.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 85 | view_5.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 86 | view_6.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 87 | shen = "爷爷"; | ||
| 88 | iv_1.setBackgroundResource(R.mipmap.wsyq); | ||
| 89 | iv_2.setBackgroundResource(R.mipmap.wsyq); | ||
| 90 | iv_3.setBackgroundResource(R.mipmap.gx); | ||
| 91 | iv_4.setBackgroundResource(R.mipmap.wsyq); | ||
| 92 | iv_5.setBackgroundResource(R.mipmap.wsyq); | ||
| 93 | iv_6.setBackgroundResource(R.mipmap.wsyq); | ||
| 94 | }); | ||
| 95 | view_4.setOnClickListener(view -> { | ||
| 96 | view_1.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 97 | view_2.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 98 | view_3.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 99 | view_4.setBackgroundResource(R.drawable.bg_solid_white_10_or); | ||
| 100 | view_5.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 101 | view_6.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 102 | shen = "奶奶"; | ||
| 103 | iv_1.setBackgroundResource(R.mipmap.wsyq); | ||
| 104 | iv_2.setBackgroundResource(R.mipmap.wsyq); | ||
| 105 | iv_3.setBackgroundResource(R.mipmap.wsyq); | ||
| 106 | iv_4.setBackgroundResource(R.mipmap.gx); | ||
| 107 | iv_5.setBackgroundResource(R.mipmap.wsyq); | ||
| 108 | iv_6.setBackgroundResource(R.mipmap.wsyq); | ||
| 109 | }); | ||
| 110 | view_5.setOnClickListener(view -> { | ||
| 111 | view_1.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 112 | view_2.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 113 | view_3.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 114 | view_4.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 115 | view_5.setBackgroundResource(R.drawable.bg_solid_white_10_or); | ||
| 116 | view_6.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 117 | shen = "外公"; | ||
| 118 | iv_1.setBackgroundResource(R.mipmap.wsyq); | ||
| 119 | iv_2.setBackgroundResource(R.mipmap.wsyq); | ||
| 120 | iv_3.setBackgroundResource(R.mipmap.wsyq); | ||
| 121 | iv_4.setBackgroundResource(R.mipmap.wsyq); | ||
| 122 | iv_5.setBackgroundResource(R.mipmap.gx); | ||
| 123 | iv_6.setBackgroundResource(R.mipmap.wsyq); | ||
| 124 | }); | ||
| 125 | view_6.setOnClickListener(view -> { | ||
| 126 | view_1.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 127 | view_2.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 128 | view_3.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 129 | view_4.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 130 | view_5.setBackgroundResource(R.drawable.bg_solid_white_10); | ||
| 131 | view_6.setBackgroundResource(R.drawable.bg_solid_white_10_or); | ||
| 132 | shen = "外婆"; | ||
| 133 | iv_1.setBackgroundResource(R.mipmap.wsyq); | ||
| 134 | iv_2.setBackgroundResource(R.mipmap.wsyq); | ||
| 135 | iv_3.setBackgroundResource(R.mipmap.wsyq); | ||
| 136 | iv_4.setBackgroundResource(R.mipmap.wsyq); | ||
| 137 | iv_5.setBackgroundResource(R.mipmap.wsyq); | ||
| 138 | iv_6.setBackgroundResource(R.mipmap.gx); | ||
| 139 | }); | ||
| 140 | |||
| 141 | } | ||
| 142 | |||
| 143 | @Override | ||
| 144 | protected void initListener() { | ||
| 145 | |||
| 146 | } | ||
| 147 | |||
| 148 | @Override | ||
| 149 | protected void initData() { | ||
| 150 | |||
| 151 | } | ||
| 152 | |||
| 153 | @Override | ||
| 154 | public void onNetChanged(int netWorkState) { | ||
| 155 | |||
| 156 | } | ||
| 157 | } | ||
| 158 |
app/src/main/java/com/hjx/parent/UserActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import com.prws.common.base.BaseActivity; | ||
| 4 | import com.prws.common.base.BasePresenter; | ||
| 5 | |||
| 6 | public class UserActivity extends BaseActivity { | ||
| 7 | |||
| 8 | @Override | ||
| 9 | protected int layoutResId() { | ||
| 10 | return R.layout.activity_me; | ||
| 11 | } | ||
| 12 | |||
| 13 | @Override | ||
| 14 | public Object getContract() { | ||
| 15 | return null; | ||
| 16 | } | ||
| 17 | |||
| 18 | @Override | ||
| 19 | public BasePresenter getPresenter() { | ||
| 20 | return null; | ||
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | @Override | ||
| 25 | protected void initView() { | ||
| 26 | |||
| 27 | } | ||
| 28 | |||
| 29 | @Override | ||
| 30 | protected void initListener() { | ||
| 31 | findViewById(R.id.iv_back).setOnClickListener(view -> onBackPressed()); | ||
| 32 | } | ||
| 33 | |||
| 34 | @Override | ||
| 35 | protected void initData() { | ||
| 36 | |||
| 37 | } | ||
| 38 | |||
| 39 | @Override | ||
| 40 | public void onNetChanged(int netWorkState) { | ||
| 41 | |||
| 42 | } | ||
| 43 | } |
app/src/main/java/com/hjx/parent/YinsiActivity.java
| File was created | 1 | package com.hjx.parent; | |
| 2 | |||
| 3 | import com.prws.common.base.BaseActivity; | ||
| 4 | import com.prws.common.base.BasePresenter; | ||
| 5 | |||
| 6 | public class YinsiActivity extends BaseActivity { | ||
| 7 | |||
| 8 | @Override | ||
| 9 | protected int layoutResId() { | ||
| 10 | return R.layout.activity_yin; | ||
| 11 | } | ||
| 12 | |||
| 13 | @Override | ||
| 14 | public Object getContract() { | ||
| 15 | return null; | ||
| 16 | } | ||
| 17 | |||
| 18 | @Override | ||
| 19 | public BasePresenter getPresenter() { | ||
| 20 | return null; | ||
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | @Override | ||
| 25 | protected void initView() { | ||
| 26 | |||
| 27 | } | ||
| 28 | |||
| 29 | @Override | ||
| 30 | protected void initListener() { | ||
| 31 | findViewById(R.id.iv_back).setOnClickListener(view -> onBackPressed()); | ||
| 32 | } | ||
| 33 | |||
| 34 | @Override | ||
| 35 | protected void initData() { | ||
| 36 | |||
| 37 | } | ||
| 38 | |||
| 39 | @Override | ||
| 40 | public void onNetChanged(int netWorkState) { | ||
| 41 | |||
| 42 | } | ||
| 43 | } |
app/src/main/java/com/hjx/parent/bean/RegisterBean.java
| File was created | 1 | package com.hjx.parent.bean; | |
| 2 | |||
| 3 | import java.io.Serializable; | ||
| 4 | |||
| 5 | public class RegisterBean implements Serializable { | ||
| 6 | |||
| 7 | Integer code; | ||
| 8 | String msg; | ||
| 9 | RegisterDataBean data; | ||
| 10 | boolean success; | ||
| 11 | |||
| 12 | public Integer getCode() { | ||
| 13 | return code; | ||
| 14 | } | ||
| 15 | |||
| 16 | public void setCode(Integer code) { | ||
| 17 | this.code = code; | ||
| 18 | } | ||
| 19 | |||
| 20 | public String getMsg() { | ||
| 21 | return msg; | ||
| 22 | } | ||
| 23 | |||
| 24 | public void setMsg(String msg) { | ||
| 25 | this.msg = msg; | ||
| 26 | } | ||
| 27 | |||
| 28 | public RegisterDataBean getData() { | ||
| 29 | return data; | ||
| 30 | } | ||
| 31 | |||
| 32 | public void setData(RegisterDataBean data) { | ||
| 33 | this.data = data; | ||
| 34 | } | ||
| 35 | |||
| 36 | public boolean isSuccess() { | ||
| 37 | return success; | ||
| 38 | } | ||
| 39 | |||
| 40 | public void setSuccess(boolean success) { | ||
| 41 | this.success = success; | ||
| 42 | } | ||
| 43 | } | ||
| 44 |
app/src/main/java/com/hjx/parent/bean/RegisterDataBean.java
| File was created | 1 | package com.hjx.parent.bean; | |
| 2 | |||
| 3 | public class RegisterDataBean { | ||
| 4 | Integer id; | ||
| 5 | String userName; | ||
| 6 | String account; | ||
| 7 | String password; | ||
| 8 | String nickName; | ||
| 9 | String phone; | ||
| 10 | String mail; | ||
| 11 | String identity; | ||
| 12 | String photo; | ||
| 13 | String qrCode; | ||
| 14 | Integer sex; | ||
| 15 | Integer createBy; | ||
| 16 | String createTime; | ||
| 17 | Integer updateBy; | ||
| 18 | String updateTime; | ||
| 19 | Integer delFlag; | ||
| 20 | |||
| 21 | |||
| 22 | public Integer getId() { | ||
| 23 | return id; | ||
| 24 | } | ||
| 25 | |||
| 26 | public void setId(Integer id) { | ||
| 27 | this.id = id; | ||
| 28 | } | ||
| 29 | |||
| 30 | public String getUserName() { | ||
| 31 | return userName; | ||
| 32 | } | ||
| 33 | |||
| 34 | public void setUserName(String userName) { | ||
| 35 | this.userName = userName; | ||
| 36 | } | ||
| 37 | |||
| 38 | public String getAccount() { | ||
| 39 | return account; | ||
| 40 | } | ||
| 41 | |||
| 42 | public void setAccount(String account) { | ||
| 43 | this.account = account; | ||
| 44 | } | ||
| 45 | |||
| 46 | public String getPassword() { | ||
| 47 | return password; | ||
| 48 | } | ||
| 49 | |||
| 50 | public void setPassword(String password) { | ||
| 51 | this.password = password; | ||
| 52 | } | ||
| 53 | |||
| 54 | public String getNickName() { | ||
| 55 | return nickName; | ||
| 56 | } | ||
| 57 | |||
| 58 | public void setNickName(String nickName) { | ||
| 59 | this.nickName = nickName; | ||
| 60 | } | ||
| 61 | |||
| 62 | public String getPhone() { | ||
| 63 | return phone; | ||
| 64 | } | ||
| 65 | |||
| 66 | public void setPhone(String phone) { | ||
| 67 | this.phone = phone; | ||
| 68 | } | ||
| 69 | |||
| 70 | public String getMail() { | ||
| 71 | return mail; | ||
| 72 | } | ||
| 73 | |||
| 74 | public void setMail(String mail) { | ||
| 75 | this.mail = mail; | ||
| 76 | } | ||
| 77 | |||
| 78 | public String getIdentity() { | ||
| 79 | return identity; | ||
| 80 | } | ||
| 81 | |||
| 82 | public void setIdentity(String identity) { | ||
| 83 | this.identity = identity; | ||
| 84 | } | ||
| 85 | |||
| 86 | public String getPhoto() { | ||
| 87 | return photo; | ||
| 88 | } | ||
| 89 | |||
| 90 | public void setPhoto(String photo) { | ||
| 91 | this.photo = photo; | ||
| 92 | } | ||
| 93 | |||
| 94 | public String getQrCode() { | ||
| 95 | return qrCode; | ||
| 96 | } | ||
| 97 | |||
| 98 | public void setQrCode(String qrCode) { | ||
| 99 | this.qrCode = qrCode; | ||
| 100 | } | ||
| 101 | |||
| 102 | public Integer getSex() { | ||
| 103 | return sex; | ||
| 104 | } | ||
| 105 | |||
| 106 | public void setSex(Integer sex) { | ||
| 107 | this.sex = sex; | ||
| 108 | } | ||
| 109 | |||
| 110 | public Integer getCreateBy() { | ||
| 111 | return createBy; | ||
| 112 | } | ||
| 113 | |||
| 114 | public void setCreateBy(Integer createBy) { | ||
| 115 | this.createBy = createBy; | ||
| 116 | } | ||
| 117 | |||
| 118 | public String getCreateTime() { | ||
| 119 | return createTime; | ||
| 120 | } | ||
| 121 | |||
| 122 | public void setCreateTime(String createTime) { | ||
| 123 | this.createTime = createTime; | ||
| 124 | } | ||
| 125 | |||
| 126 | public Integer getUpdateBy() { | ||
| 127 | return updateBy; | ||
| 128 | } | ||
| 129 | |||
| 130 | public void setUpdateBy(Integer updateBy) { | ||
| 131 | this.updateBy = updateBy; | ||
| 132 | } | ||
| 133 | |||
| 134 | public String getUpdateTime() { | ||
| 135 | return updateTime; | ||
| 136 | } | ||
| 137 | |||
| 138 | public void setUpdateTime(String updateTime) { | ||
| 139 | this.updateTime = updateTime; | ||
| 140 | } | ||
| 141 | |||
| 142 | public Integer getDelFlag() { | ||
| 143 | return delFlag; | ||
| 144 | } | ||
| 145 | |||
| 146 | public void setDelFlag(Integer delFlag) { | ||
| 147 | this.delFlag = delFlag; | ||
| 148 | } | ||
| 149 | } | ||
| 150 |
app/src/main/java/com/hjx/parent/bean/StudentBean.java
| File was created | 1 | package com.hjx.parent.bean; | |
| 2 | |||
| 3 | public class StudentBean { | ||
| 4 | |||
| 5 | String stuId; | ||
| 6 | String stuName; | ||
| 7 | int gender; | ||
| 8 | String term; | ||
| 9 | String account; | ||
| 10 | String nickName; | ||
| 11 | String address; | ||
| 12 | String phone; | ||
| 13 | String photo; | ||
| 14 | int fromType; | ||
| 15 | int gradeId; | ||
| 16 | String oriSchool; | ||
| 17 | String parentPhone; | ||
| 18 | String parentIdentity; | ||
| 19 | String teacherName; | ||
| 20 | int teacherId; | ||
| 21 | |||
| 22 | @Override | ||
| 23 | public String toString() { | ||
| 24 | return "StudentBean{" + | ||
| 25 | "stuId='" + stuId + '\'' + | ||
| 26 | ", stuName='" + stuName + '\'' + | ||
| 27 | ", gender=" + gender + | ||
| 28 | ", term='" + term + '\'' + | ||
| 29 | ", account='" + account + '\'' + | ||
| 30 | ", nickName='" + nickName + '\'' + | ||
| 31 | ", address='" + address + '\'' + | ||
| 32 | ", phone='" + phone + '\'' + | ||
| 33 | ", photo='" + photo + '\'' + | ||
| 34 | ", fromType=" + fromType + | ||
| 35 | ", gradeId=" + gradeId + | ||
| 36 | ", oriSchool='" + oriSchool + '\'' + | ||
| 37 | ", parentPhone='" + parentPhone + '\'' + | ||
| 38 | ", parentIdentity='" + parentIdentity + '\'' + | ||
| 39 | ", teacherName='" + teacherName + '\'' + | ||
| 40 | ", teacherId=" + teacherId + | ||
| 41 | '}'; | ||
| 42 | } | ||
| 43 | |||
| 44 | public String getStuId() { | ||
| 45 | return stuId; | ||
| 46 | } | ||
| 47 | |||
| 48 | public void setStuId(String stuId) { | ||
| 49 | this.stuId = stuId; | ||
| 50 | } | ||
| 51 | |||
| 52 | public String getStuName() { | ||
| 53 | return stuName; | ||
| 54 | } | ||
| 55 | |||
| 56 | public void setStuName(String stuName) { | ||
| 57 | this.stuName = stuName; | ||
| 58 | } | ||
| 59 | |||
| 60 | public int getGender() { | ||
| 61 | return gender; | ||
| 62 | } | ||
| 63 | |||
| 64 | public void setGender(int gender) { | ||
| 65 | this.gender = gender; | ||
| 66 | } | ||
| 67 | |||
| 68 | public String getTerm() { | ||
| 69 | return term; | ||
| 70 | } | ||
| 71 | |||
| 72 | public void setTerm(String term) { | ||
| 73 | this.term = term; | ||
| 74 | } | ||
| 75 | |||
| 76 | public String getAccount() { | ||
| 77 | return account; | ||
| 78 | } | ||
| 79 | |||
| 80 | public void setAccount(String account) { | ||
| 81 | this.account = account; | ||
| 82 | } | ||
| 83 | |||
| 84 | public String getNickName() { | ||
| 85 | return nickName; | ||
| 86 | } | ||
| 87 | |||
| 88 | public void setNickName(String nickName) { | ||
| 89 | this.nickName = nickName; | ||
| 90 | } | ||
| 91 | |||
| 92 | public String getAddress() { | ||
| 93 | return address; | ||
| 94 | } | ||
| 95 | |||
| 96 | public void setAddress(String address) { | ||
| 97 | this.address = address; | ||
| 98 | } | ||
| 99 | |||
| 100 | public String getPhone() { | ||
| 101 | return phone; | ||
| 102 | } | ||
| 103 | |||
| 104 | public void setPhone(String phone) { | ||
| 105 | this.phone = phone; | ||
| 106 | } | ||
| 107 | |||
| 108 | public String getPhoto() { | ||
| 109 | return photo; | ||
| 110 | } | ||
| 111 | |||
| 112 | public void setPhoto(String photo) { | ||
| 113 | this.photo = photo; | ||
| 114 | } | ||
| 115 | |||
| 116 | public int getFromType() { | ||
| 117 | return fromType; | ||
| 118 | } | ||
| 119 | |||
| 120 | public void setFromType(int fromType) { | ||
| 121 | this.fromType = fromType; | ||
| 122 | } | ||
| 123 | |||
| 124 | public int getGradeId() { | ||
| 125 | return gradeId; | ||
| 126 | } | ||
| 127 | |||
| 128 | public void setGradeId(int gradeId) { | ||
| 129 | this.gradeId = gradeId; | ||
| 130 | } | ||
| 131 | |||
| 132 | public String getOriSchool() { | ||
| 133 | return oriSchool; | ||
| 134 | } | ||
| 135 | |||
| 136 | public void setOriSchool(String oriSchool) { | ||
| 137 | this.oriSchool = oriSchool; | ||
| 138 | } | ||
| 139 | |||
| 140 | public String getParentPhone() { | ||
| 141 | return parentPhone; | ||
| 142 | } | ||
| 143 | |||
| 144 | public void setParentPhone(String parentPhone) { | ||
| 145 | this.parentPhone = parentPhone; | ||
| 146 | } | ||
| 147 | |||
| 148 | public String getParentIdentity() { | ||
| 149 | return parentIdentity; | ||
| 150 | } | ||
| 151 | |||
| 152 | public void setParentIdentity(String parentIdentity) { | ||
| 153 | this.parentIdentity = parentIdentity; | ||
| 154 | } | ||
| 155 | |||
| 156 | public String getTeacherName() { | ||
| 157 | return teacherName; | ||
| 158 | } | ||
| 159 | |||
| 160 | public void setTeacherName(String teacherName) { | ||
| 161 | this.teacherName = teacherName; | ||
| 162 | } | ||
| 163 | |||
| 164 | public int getTeacherId() { | ||
| 165 | return teacherId; | ||
| 166 | } | ||
| 167 | |||
| 168 | public void setTeacherId(int teacherId) { | ||
| 169 | this.teacherId = teacherId; | ||
| 170 | } | ||
| 171 | } | ||
| 172 |
app/src/main/java/com/hjx/parent/fragment/HomeFragment.java
| File was created | 1 | package com.hjx.parent.fragment; | |
| 2 | |||
| 3 | import android.content.Intent; | ||
| 4 | import android.os.Bundle; | ||
| 5 | import android.widget.ImageView; | ||
| 6 | import android.widget.TextView; | ||
| 7 | import android.widget.Toast; | ||
| 8 | |||
| 9 | import androidx.annotation.Nullable; | ||
| 10 | |||
| 11 | import com.hjq.permissions.OnPermissionCallback; | ||
| 12 | import com.hjq.permissions.Permission; | ||
| 13 | import com.hjq.permissions.XXPermissions; | ||
| 14 | import com.hjx.parent.R; | ||
| 15 | import com.prws.common.base.BaseFragment; | ||
| 16 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 17 | import com.uuzuche.lib_zxing.activity.CaptureActivity; | ||
| 18 | import com.uuzuche.lib_zxing.activity.CodeUtils; | ||
| 19 | |||
| 20 | import java.util.List; | ||
| 21 | |||
| 22 | public class HomeFragment extends BaseFragment { | ||
| 23 | @Override | ||
| 24 | protected int getLayoutRes() { | ||
| 25 | return R.layout.fragment_home; | ||
| 26 | } | ||
| 27 | |||
| 28 | ImageView iv_sapmiao; | ||
| 29 | TextView tv_name; | ||
| 30 | @Override | ||
| 31 | protected void initDatas() { | ||
| 32 | super.initDatas(); | ||
| 33 | iv_sapmiao = mRootView.findViewById(R.id.iv_sapmiao); | ||
| 34 | tv_name = mRootView.findViewById(R.id.tv_name); | ||
| 35 | iv_sapmiao.setOnClickListener(view -> { | ||
| 36 | |||
| 37 | if (!XXPermissions.isGranted(getActivity(), Permission.CAMERA)){ | ||
| 38 | XXPermissions.with(getActivity()) | ||
| 39 | // 申请多个权限 | ||
| 40 | .permission(Permission.CAMERA) | ||
| 41 | .request(new OnPermissionCallback() { | ||
| 42 | @Override | ||
| 43 | public void onGranted(List<String> permissions, boolean all) { | ||
| 44 | if (all){ | ||
| 45 | //开启扫码界面 | ||
| 46 | startQRView(); | ||
| 47 | |||
| 48 | |||
| 49 | }else { | ||
| 50 | Toast.makeText(getActivity(),"需要相机权限",Toast.LENGTH_SHORT).show(); | ||
| 51 | } | ||
| 52 | } | ||
| 53 | |||
| 54 | @Override | ||
| 55 | public void onDenied(List<String> permissions, boolean never) { | ||
| 56 | XXPermissions.startPermissionActivity(getActivity(), permissions); | ||
| 57 | } | ||
| 58 | }); | ||
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | |||
| 63 | }else { | ||
| 64 | startQRView(); | ||
| 65 | } | ||
| 66 | |||
| 67 | |||
| 68 | }); | ||
| 69 | |||
| 70 | String role = (String) SharedPreferencesUtil.getData("role",""); | ||
| 71 | String userId = (String) SharedPreferencesUtil.getData("userId",""); | ||
| 72 | String token = (String) SharedPreferencesUtil.getData("token",""); | ||
| 73 | String phone = (String) SharedPreferencesUtil.getData("phone",""); | ||
| 74 | if (role != null && role.length() > 0) | ||
| 75 | tv_name.setText(role); | ||
| 76 | |||
| 77 | } | ||
| 78 | |||
| 79 | public void startQRView(){ | ||
| 80 | |||
| 81 | |||
| 82 | startActivityForResult(new Intent(getActivity(), CaptureActivity.class),101); | ||
| 83 | |||
| 84 | |||
| 85 | } | ||
| 86 | |||
| 87 | @Override | ||
| 88 | public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { | ||
| 89 | super.onActivityResult(requestCode, resultCode, data); | ||
| 90 | if (requestCode == 101){ | ||
| 91 | if (null != data) { | ||
| 92 | Bundle bundle = data.getExtras(); | ||
| 93 | if (bundle == null) { | ||
| 94 | return; | ||
| 95 | } | ||
| 96 | if (bundle.getInt(CodeUtils.RESULT_TYPE) == CodeUtils.RESULT_SUCCESS) { | ||
| 97 | String result = bundle.getString(CodeUtils.RESULT_STRING); | ||
| 98 | Toast.makeText(getActivity(), "解析结果:" + result, Toast.LENGTH_LONG).show(); | ||
| 99 | } else if (bundle.getInt(CodeUtils.RESULT_TYPE) == CodeUtils.RESULT_FAILED) { | ||
| 100 | Toast.makeText(getActivity(), "解析二维码失败", Toast.LENGTH_LONG).show(); | ||
| 101 | } | ||
| 102 | } | ||
| 103 | } | ||
| 104 | |||
| 105 | |||
| 106 | } | ||
| 107 | } | ||
| 108 |
app/src/main/java/com/hjx/parent/fragment/MeFragment.java
| File was created | 1 | package com.hjx.parent.fragment; | |
| 2 | |||
| 3 | import android.content.Intent; | ||
| 4 | import android.view.View; | ||
| 5 | import android.widget.ImageView; | ||
| 6 | import android.widget.TextView; | ||
| 7 | import android.widget.Toast; | ||
| 8 | |||
| 9 | import androidx.constraintlayout.widget.Group; | ||
| 10 | |||
| 11 | import com.bumptech.glide.Glide; | ||
| 12 | import com.developer.wang.utils.PermissionUtils; | ||
| 13 | import com.google.gson.Gson; | ||
| 14 | import com.google.gson.JsonArray; | ||
| 15 | import com.hjq.permissions.OnPermissionCallback; | ||
| 16 | import com.hjq.permissions.Permission; | ||
| 17 | import com.hjq.permissions.XXPermissions; | ||
| 18 | import com.hjx.parent.AccountActivity; | ||
| 19 | import com.hjx.parent.AddStudentActivity; | ||
| 20 | import com.hjx.parent.LoginActivity; | ||
| 21 | import com.hjx.parent.MainActivity; | ||
| 22 | import com.hjx.parent.QRActivity; | ||
| 23 | import com.hjx.parent.R; | ||
| 24 | import com.hjx.parent.UserActivity; | ||
| 25 | import com.hjx.parent.YinsiActivity; | ||
| 26 | import com.hjx.parent.bean.StudentBean; | ||
| 27 | import com.prws.common.base.BaseFragment; | ||
| 28 | import com.prws.common.net.NetWorks; | ||
| 29 | import com.prws.common.utils.LogUtil; | ||
| 30 | import com.prws.common.utils.SharedPreferencesUtil; | ||
| 31 | |||
| 32 | import org.json.JSONArray; | ||
| 33 | import org.json.JSONObject; | ||
| 34 | |||
| 35 | import java.util.ArrayList; | ||
| 36 | import java.util.HashMap; | ||
| 37 | import java.util.List; | ||
| 38 | import java.util.Map; | ||
| 39 | |||
| 40 | import io.reactivex.Observer; | ||
| 41 | import io.reactivex.disposables.Disposable; | ||
| 42 | import okhttp3.ResponseBody; | ||
| 43 | |||
| 44 | public class MeFragment extends BaseFragment { | ||
| 45 | @Override | ||
| 46 | protected int getLayoutRes() { | ||
| 47 | return R.layout.fragment_me; | ||
| 48 | } | ||
| 49 | |||
| 50 | ImageView iv_bann; | ||
| 51 | Group group_1; | ||
| 52 | TextView tv_name; | ||
| 53 | TextView tv_phone; | ||
| 54 | ImageView iv_21, iv_22, iv_23; | ||
| 55 | TextView tv_21, tv_22, tv_23; | ||
| 56 | |||
| 57 | |||
| 58 | @Override | ||
| 59 | protected void initDatas() { | ||
| 60 | super.initDatas(); | ||
| 61 | |||
| 62 | |||
| 63 | iv_bann = mRootView.findViewById(R.id.iv_bann); | ||
| 64 | group_1 = mRootView.findViewById(R.id.group_1); | ||
| 65 | |||
| 66 | String role = (String) SharedPreferencesUtil.getData("role", ""); | ||
| 67 | String userId = (String) SharedPreferencesUtil.getData("userId", ""); | ||
| 68 | String token = (String) SharedPreferencesUtil.getData("token", ""); | ||
| 69 | String phone = (String) SharedPreferencesUtil.getData("phone", ""); | ||
| 70 | if (role == null || role.length() == 0) { | ||
| 71 | iv_bann.setVisibility(View.VISIBLE); | ||
| 72 | group_1.setVisibility(View.GONE); | ||
| 73 | |||
| 74 | iv_bann.setOnClickListener(view -> { | ||
| 75 | |||
| 76 | if (!XXPermissions.isGranted(getActivity(), Permission.CAMERA)) { | ||
| 77 | XXPermissions.with(getActivity()) | ||
| 78 | // 申请多个权限 | ||
| 79 | .permission(Permission.CAMERA) | ||
| 80 | .request(new OnPermissionCallback() { | ||
| 81 | @Override | ||
| 82 | public void onGranted(List<String> permissions, boolean all) { | ||
| 83 | if (all) { | ||
| 84 | //开启扫码界面 | ||
| 85 | startActivity(new Intent(getActivity(), QRActivity.class)); | ||
| 86 | getActivity().finish(); | ||
| 87 | } else { | ||
| 88 | Toast.makeText(getActivity(), "需要相机权限", Toast.LENGTH_SHORT).show(); | ||
| 89 | } | ||
| 90 | } | ||
| 91 | |||
| 92 | @Override | ||
| 93 | public void onDenied(List<String> permissions, boolean never) { | ||
| 94 | XXPermissions.startPermissionActivity(getActivity(), permissions); | ||
| 95 | } | ||
| 96 | }); | ||
| 97 | |||
| 98 | |||
| 99 | } | ||
| 100 | |||
| 101 | |||
| 102 | }); | ||
| 103 | return; | ||
| 104 | } else { | ||
| 105 | iv_bann.setVisibility(View.GONE); | ||
| 106 | group_1.setVisibility(View.VISIBLE); | ||
| 107 | } | ||
| 108 | tv_name = mRootView.findViewById(R.id.tv_name); | ||
| 109 | tv_phone = mRootView.findViewById(R.id.tv_phone); | ||
| 110 | iv_21 = mRootView.findViewById(R.id.iv_21); | ||
| 111 | iv_22 = mRootView.findViewById(R.id.iv_22); | ||
| 112 | iv_23 = mRootView.findViewById(R.id.iv_23); | ||
| 113 | tv_21 = mRootView.findViewById(R.id.tv_21); | ||
| 114 | tv_22 = mRootView.findViewById(R.id.tv_22); | ||
| 115 | tv_23 = mRootView.findViewById(R.id.tv_23); | ||
| 116 | |||
| 117 | tv_phone.setText(phone); | ||
| 118 | tv_name.setText(role); | ||
| 119 | |||
| 120 | iv_21.setOnClickListener(view -> { | ||
| 121 | if (iv_21.getBackground().getConstantState().equals(getActivity().getDrawable(R.mipmap.tjxss).getConstantState())) { | ||
| 122 | startActivity(new Intent(getActivity(), AddStudentActivity.class)); | ||
| 123 | } | ||
| 124 | |||
| 125 | }); | ||
| 126 | |||
| 127 | iv_22.setOnClickListener(view -> { | ||
| 128 | if (iv_22.getBackground().getConstantState().equals(getActivity().getDrawable(R.mipmap.tjxss).getConstantState())) { | ||
| 129 | startActivity(new Intent(getActivity(), AddStudentActivity.class)); | ||
| 130 | |||
| 131 | } | ||
| 132 | }); | ||
| 133 | iv_23.setOnClickListener(view -> { | ||
| 134 | if (iv_23.getBackground().getConstantState().equals(getActivity().getDrawable(R.mipmap.tjxss).getConstantState())) { | ||
| 135 | startActivity(new Intent(getActivity(), AddStudentActivity.class)); | ||
| 136 | } | ||
| 137 | }); | ||
| 138 | |||
| 139 | |||
| 140 | } | ||
| 141 | |||
| 142 | @Override | ||
| 143 | public void onResume() { | ||
| 144 | super.onResume(); | ||
| 145 | loadChildList(); | ||
| 146 | } | ||
| 147 | |||
| 148 | ArrayList<StudentBean> alist = new ArrayList<>(); | ||
| 149 | |||
| 150 | public void loadChildList() { | ||
| 151 | |||
| 152 | |||
| 153 | NetWorks.listChildren(new Observer<ResponseBody>() { | ||
| 154 | @Override | ||
| 155 | public void onSubscribe(Disposable d) { | ||
| 156 | |||
| 157 | } | ||
| 158 | |||
| 159 | @Override | ||
| 160 | public void onNext(ResponseBody responseBody) { | ||
| 161 | try { | ||
| 162 | |||
| 163 | String str = responseBody.string().toString(); | ||
| 164 | |||
| 165 | |||
| 166 | LogUtil.e("TAG", "----" + str); | ||
| 167 | JSONObject jo = new JSONObject(str); | ||
| 168 | boolean isSucceed = jo.getBoolean("success"); | ||
| 169 | if (isSucceed) { | ||
| 170 | JSONArray jarr = jo.getJSONArray("data"); | ||
| 171 | alist.clear(); | ||
| 172 | for (int i = 0; i < jarr.length(); i++) { | ||
| 173 | JSONObject jo2 = jarr.getJSONObject(i); | ||
| 174 | StudentBean sb = new StudentBean(); | ||
| 175 | try { | ||
| 176 | sb.setStuId(jo2.getString("stuId")); | ||
| 177 | } catch (Exception e) { | ||
| 178 | } | ||
| 179 | try { | ||
| 180 | sb.setStuName(jo2.getString("stuName")); | ||
| 181 | } catch (Exception e) { | ||
| 182 | } | ||
| 183 | try { | ||
| 184 | sb.setGender(jo2.getInt("gender")); | ||
| 185 | } catch (Exception e) { | ||
| 186 | } | ||
| 187 | try { | ||
| 188 | sb.setTerm(jo2.getString("term")); | ||
| 189 | } catch (Exception e) { | ||
| 190 | } | ||
| 191 | try { | ||
| 192 | sb.setAccount(jo2.getString("account")); | ||
| 193 | } catch (Exception e) { | ||
| 194 | } | ||
| 195 | try { | ||
| 196 | sb.setNickName(jo2.getString("nickName")); | ||
| 197 | } catch (Exception e) { | ||
| 198 | } | ||
| 199 | try { | ||
| 200 | sb.setAddress(jo2.getString("address")); | ||
| 201 | } catch (Exception e) { | ||
| 202 | } | ||
| 203 | try { | ||
| 204 | sb.setPhone(jo2.getString("phone")); | ||
| 205 | } catch (Exception e) { | ||
| 206 | } | ||
| 207 | try { | ||
| 208 | sb.setPhoto(jo2.getString("photo")); | ||
| 209 | } catch (Exception e) { | ||
| 210 | } | ||
| 211 | try { | ||
| 212 | sb.setFromType(jo2.getInt("fromType")); | ||
| 213 | } catch (Exception e) { | ||
| 214 | } | ||
| 215 | try { | ||
| 216 | sb.setGradeId(jo2.getInt("gradeId")); | ||
| 217 | } catch (Exception e) { | ||
| 218 | } | ||
| 219 | try { | ||
| 220 | sb.setTeacherId(jo2.getInt("teacherId")); | ||
| 221 | } catch (Exception e) { | ||
| 222 | } | ||
| 223 | try { | ||
| 224 | sb.setOriSchool(jo2.getString("oriSchool")); | ||
| 225 | } catch (Exception e) { | ||
| 226 | } | ||
| 227 | try { | ||
| 228 | sb.setParentPhone(jo2.getString("parentPhone")); | ||
| 229 | } catch (Exception e) { | ||
| 230 | } | ||
| 231 | try { | ||
| 232 | sb.setParentIdentity(jo2.getString("parentIdentity")); | ||
| 233 | } catch (Exception e) { | ||
| 234 | } | ||
| 235 | try { | ||
| 236 | sb.setTeacherName(jo2.getString("teacherName")); | ||
| 237 | } catch (Exception e) { | ||
| 238 | } | ||
| 239 | alist.add(sb); | ||
| 240 | } | ||
| 241 | |||
| 242 | if (alist.size() > 0) | ||
| 243 | loadList(); | ||
| 244 | |||
| 245 | } else { | ||
| 246 | |||
| 247 | } | ||
| 248 | } catch (Exception e) { | ||
| 249 | e.printStackTrace(); | ||
| 250 | |||
| 251 | } | ||
| 252 | |||
| 253 | } | ||
| 254 | |||
| 255 | @Override | ||
| 256 | public void onError(Throwable e) { | ||
| 257 | |||
| 258 | } | ||
| 259 | |||
| 260 | @Override | ||
| 261 | public void onComplete() { | ||
| 262 | |||
| 263 | } | ||
| 264 | }); | ||
| 265 | |||
| 266 | |||
| 267 | mRootView.findViewById(R.id.view_4).setOnClickListener(view -> startActivity(new Intent(getActivity(), YinsiActivity.class))); | ||
| 268 | mRootView.findViewById(R.id.view_5).setOnClickListener(view -> startActivity(new Intent(getActivity(), UserActivity.class))); | ||
| 269 | mRootView.findViewById(R.id.view_3).setOnClickListener(view -> startActivity(new Intent(getActivity(), AccountActivity.class))); | ||
| 270 | |||
| 271 | } | ||
| 272 | |||
| 273 | public void loadList() { | ||
| 274 | iv_21.setBackgroundResource(R.mipmap.tjxss); | ||
| 275 | tv_21.setText("添加学生"); | ||
| 276 | |||
| 277 | |||
| 278 | iv_22.setBackgroundResource(R.mipmap.tjxss); | ||
| 279 | tv_22.setText("添加学生"); | ||
| 280 | |||
| 281 | iv_23.setBackgroundResource(R.mipmap.tjxss); | ||
| 282 | tv_23.setText("添加学生"); | ||
| 283 | |||
| 284 | if (alist.size() >= 1) { | ||
| 285 | // if (alist.get(0).getPhoto() != null && alist.get(0).getPhoto().length() > 0) | ||
| 286 | // Glide.with(getActivity()).load(alist.get(0).getPhoto()).into(iv_21); | ||
| 287 | // else | ||
| 288 | iv_21.setBackgroundResource(R.mipmap.txz); | ||
| 289 | tv_21.setText(alist.get(0).getStuName()); | ||
| 290 | } | ||
| 291 | if (alist.size() >= 2) { | ||
| 292 | // if (alist.get(1).getPhoto() != null && alist.get(1).getPhoto().length() > 0) | ||
| 293 | // Glide.with(getActivity()).load(alist.get(1).getPhoto()).into(iv_22); | ||
| 294 | // else | ||
| 295 | iv_22.setBackgroundResource(R.mipmap.txz); | ||
| 296 | tv_22.setText(alist.get(1).getStuName()); | ||
| 297 | } | ||
| 298 | if (alist.size() >= 3) { | ||
| 299 | // if (alist.get(2).getPhoto() != null && alist.get(2).getPhoto().length() > 0) | ||
| 300 | // Glide.with(getActivity()).load(alist.get(2).getPhoto()).into(iv_23); | ||
| 301 | // else | ||
| 302 | iv_23.setBackgroundResource(R.mipmap.txz); | ||
| 303 | tv_23.setText(alist.get(2).getStuName()); | ||
| 304 | } | ||
| 305 | } | ||
| 306 | } | ||
| 307 |
app/src/main/res/drawable/bg_solid_btn.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:shape="rectangle"> | ||
| 4 | |||
| 5 | <solid android:color="#FE5E09" /> | ||
| 6 | |||
| 7 | <corners | ||
| 8 | android:radius="25dp" | ||
| 9 | /> | ||
| 10 | |||
| 11 | </shape> |
app/src/main/res/drawable/bg_solid_btn_grad.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:shape="rectangle"> | ||
| 4 | |||
| 5 | <solid android:color="#E5E5E5" /> | ||
| 6 | |||
| 7 | <corners | ||
| 8 | android:radius="20dp" | ||
| 9 | /> | ||
| 10 | |||
| 11 | </shape> |
app/src/main/res/drawable/bg_solid_white.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:shape="rectangle"> | ||
| 4 | |||
| 5 | <solid android:color="#F7F8FA" /> | ||
| 6 | |||
| 7 | <corners | ||
| 8 | android:radius="25dp" | ||
| 9 | /> | ||
| 10 | |||
| 11 | </shape> |
app/src/main/res/drawable/bg_solid_white_10.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:shape="rectangle"> | ||
| 4 | |||
| 5 | <solid android:color="#FFFFFF" /> | ||
| 6 | |||
| 7 | <corners | ||
| 8 | android:radius="10dp" | ||
| 9 | /> | ||
| 10 | |||
| 11 | </shape> |
app/src/main/res/drawable/bg_solid_white_10_bottom.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:shape="rectangle"> | ||
| 4 | |||
| 5 | <solid android:color="#FFFFFF" /> | ||
| 6 | |||
| 7 | <corners | ||
| 8 | android:bottomLeftRadius="10dp" | ||
| 9 | android:bottomRightRadius="10dp" | ||
| 10 | /> | ||
| 11 | |||
| 12 | </shape> |
app/src/main/res/drawable/bg_solid_white_10_or.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:shape="rectangle"> | ||
| 4 | |||
| 5 | <solid android:color="#FFFFFF" | ||
| 6 | /> | ||
| 7 | <stroke android:width="2dp" | ||
| 8 | android:color="#FE5E09" | ||
| 9 | /> | ||
| 10 | |||
| 11 | <corners | ||
| 12 | android:radius="10dp" | ||
| 13 | /> | ||
| 14 | |||
| 15 | </shape> |
app/src/main/res/drawable/bg_solid_white_10_top.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:shape="rectangle"> | ||
| 4 | |||
| 5 | <solid android:color="#FFFFFF" /> | ||
| 6 | |||
| 7 | <corners | ||
| 8 | android:topRightRadius="10dp" | ||
| 9 | android:topLeftRadius="10dp" | ||
| 10 | /> | ||
| 11 | |||
| 12 | </shape> |
app/src/main/res/drawable/bg_solid_white_20.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:shape="rectangle"> | ||
| 4 | |||
| 5 | <solid android:color="#FFFFFF" /> | ||
| 6 | |||
| 7 | <corners | ||
| 8 | android:topLeftRadius="20dp" | ||
| 9 | android:topRightRadius="20dp" | ||
| 10 | /> | ||
| 11 | |||
| 12 | </shape> |
app/src/main/res/drawable/checked_xc.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | |||
| 4 | <item android:state_checked="true" | ||
| 5 | android:drawable="@mipmap/gx" | ||
| 6 | /> | ||
| 7 | <item android:state_checked="false" | ||
| 8 | android:drawable="@mipmap/wsyq" | ||
| 9 | /> | ||
| 10 | |||
| 11 | </selector> |
app/src/main/res/drawable/ic_launcher_background.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:width="108dp" | ||
| 4 | android:height="108dp" | ||
| 5 | android:viewportWidth="108" | ||
| 6 | android:viewportHeight="108"> | ||
| 7 | <path | ||
| 8 | android:fillColor="#3DDC84" | ||
| 9 | android:pathData="M0,0h108v108h-108z" /> | ||
| 10 | <path | ||
| 11 | android:fillColor="#00000000" | ||
| 12 | android:pathData="M9,0L9,108" | ||
| 13 | android:strokeWidth="0.8" | ||
| 14 | android:strokeColor="#33FFFFFF" /> | ||
| 15 | <path | ||
| 16 | android:fillColor="#00000000" | ||
| 17 | android:pathData="M19,0L19,108" | ||
| 18 | android:strokeWidth="0.8" | ||
| 19 | android:strokeColor="#33FFFFFF" /> | ||
| 20 | <path | ||
| 21 | android:fillColor="#00000000" | ||
| 22 | android:pathData="M29,0L29,108" | ||
| 23 | android:strokeWidth="0.8" | ||
| 24 | android:strokeColor="#33FFFFFF" /> | ||
| 25 | <path | ||
| 26 | android:fillColor="#00000000" | ||
| 27 | android:pathData="M39,0L39,108" | ||
| 28 | android:strokeWidth="0.8" | ||
| 29 | android:strokeColor="#33FFFFFF" /> | ||
| 30 | <path | ||
| 31 | android:fillColor="#00000000" | ||
| 32 | android:pathData="M49,0L49,108" | ||
| 33 | android:strokeWidth="0.8" | ||
| 34 | android:strokeColor="#33FFFFFF" /> | ||
| 35 | <path | ||
| 36 | android:fillColor="#00000000" | ||
| 37 | android:pathData="M59,0L59,108" | ||
| 38 | android:strokeWidth="0.8" | ||
| 39 | android:strokeColor="#33FFFFFF" /> | ||
| 40 | <path | ||
| 41 | android:fillColor="#00000000" | ||
| 42 | android:pathData="M69,0L69,108" | ||
| 43 | android:strokeWidth="0.8" | ||
| 44 | android:strokeColor="#33FFFFFF" /> | ||
| 45 | <path | ||
| 46 | android:fillColor="#00000000" | ||
| 47 | android:pathData="M79,0L79,108" | ||
| 48 | android:strokeWidth="0.8" | ||
| 49 | android:strokeColor="#33FFFFFF" /> | ||
| 50 | <path | ||
| 51 | android:fillColor="#00000000" | ||
| 52 | android:pathData="M89,0L89,108" | ||
| 53 | android:strokeWidth="0.8" | ||
| 54 | android:strokeColor="#33FFFFFF" /> | ||
| 55 | <path | ||
| 56 | android:fillColor="#00000000" | ||
| 57 | android:pathData="M99,0L99,108" | ||
| 58 | android:strokeWidth="0.8" | ||
| 59 | android:strokeColor="#33FFFFFF" /> | ||
| 60 | <path | ||
| 61 | android:fillColor="#00000000" | ||
| 62 | android:pathData="M0,9L108,9" | ||
| 63 | android:strokeWidth="0.8" | ||
| 64 | android:strokeColor="#33FFFFFF" /> | ||
| 65 | <path | ||
| 66 | android:fillColor="#00000000" | ||
| 67 | android:pathData="M0,19L108,19" | ||
| 68 | android:strokeWidth="0.8" | ||
| 69 | android:strokeColor="#33FFFFFF" /> | ||
| 70 | <path | ||
| 71 | android:fillColor="#00000000" | ||
| 72 | android:pathData="M0,29L108,29" | ||
| 73 | android:strokeWidth="0.8" | ||
| 74 | android:strokeColor="#33FFFFFF" /> | ||
| 75 | <path | ||
| 76 | android:fillColor="#00000000" | ||
| 77 | android:pathData="M0,39L108,39" | ||
| 78 | android:strokeWidth="0.8" | ||
| 79 | android:strokeColor="#33FFFFFF" /> | ||
| 80 | <path | ||
| 81 | android:fillColor="#00000000" | ||
| 82 | android:pathData="M0,49L108,49" | ||
| 83 | android:strokeWidth="0.8" | ||
| 84 | android:strokeColor="#33FFFFFF" /> | ||
| 85 | <path | ||
| 86 | android:fillColor="#00000000" | ||
| 87 | android:pathData="M0,59L108,59" | ||
| 88 | android:strokeWidth="0.8" | ||
| 89 | android:strokeColor="#33FFFFFF" /> | ||
| 90 | <path | ||
| 91 | android:fillColor="#00000000" | ||
| 92 | android:pathData="M0,69L108,69" | ||
| 93 | android:strokeWidth="0.8" | ||
| 94 | android:strokeColor="#33FFFFFF" /> | ||
| 95 | <path | ||
| 96 | android:fillColor="#00000000" | ||
| 97 | android:pathData="M0,79L108,79" | ||
| 98 | android:strokeWidth="0.8" | ||
| 99 | android:strokeColor="#33FFFFFF" /> | ||
| 100 | <path | ||
| 101 | android:fillColor="#00000000" | ||
| 102 | android:pathData="M0,89L108,89" | ||
| 103 | android:strokeWidth="0.8" | ||
| 104 | android:strokeColor="#33FFFFFF" /> | ||
| 105 | <path | ||
| 106 | android:fillColor="#00000000" | ||
| 107 | android:pathData="M0,99L108,99" | ||
| 108 | android:strokeWidth="0.8" | ||
| 109 | android:strokeColor="#33FFFFFF" /> | ||
| 110 | <path | ||
| 111 | android:fillColor="#00000000" | ||
| 112 | android:pathData="M19,29L89,29" | ||
| 113 | android:strokeWidth="0.8" | ||
| 114 | android:strokeColor="#33FFFFFF" /> | ||
| 115 | <path | ||
| 116 | android:fillColor="#00000000" | ||
| 117 | android:pathData="M19,39L89,39" | ||
| 118 | android:strokeWidth="0.8" | ||
| 119 | android:strokeColor="#33FFFFFF" /> | ||
| 120 | <path | ||
| 121 | android:fillColor="#00000000" | ||
| 122 | android:pathData="M19,49L89,49" | ||
| 123 | android:strokeWidth="0.8" | ||
| 124 | android:strokeColor="#33FFFFFF" /> | ||
| 125 | <path | ||
| 126 | android:fillColor="#00000000" | ||
| 127 | android:pathData="M19,59L89,59" | ||
| 128 | android:strokeWidth="0.8" | ||
| 129 | android:strokeColor="#33FFFFFF" /> | ||
| 130 | <path | ||
| 131 | android:fillColor="#00000000" | ||
| 132 | android:pathData="M19,69L89,69" | ||
| 133 | android:strokeWidth="0.8" | ||
| 134 | android:strokeColor="#33FFFFFF" /> | ||
| 135 | <path | ||
| 136 | android:fillColor="#00000000" | ||
| 137 | android:pathData="M19,79L89,79" | ||
| 138 | android:strokeWidth="0.8" | ||
| 139 | android:strokeColor="#33FFFFFF" /> | ||
| 140 | <path | ||
| 141 | android:fillColor="#00000000" | ||
| 142 | android:pathData="M29,19L29,89" | ||
| 143 | android:strokeWidth="0.8" | ||
| 144 | android:strokeColor="#33FFFFFF" /> | ||
| 145 | <path | ||
| 146 | android:fillColor="#00000000" | ||
| 147 | android:pathData="M39,19L39,89" | ||
| 148 | android:strokeWidth="0.8" | ||
| 149 | android:strokeColor="#33FFFFFF" /> | ||
| 150 | <path | ||
| 151 | android:fillColor="#00000000" | ||
| 152 | android:pathData="M49,19L49,89" | ||
| 153 | android:strokeWidth="0.8" | ||
| 154 | android:strokeColor="#33FFFFFF" /> | ||
| 155 | <path | ||
| 156 | android:fillColor="#00000000" | ||
| 157 | android:pathData="M59,19L59,89" | ||
| 158 | android:strokeWidth="0.8" | ||
| 159 | android:strokeColor="#33FFFFFF" /> | ||
| 160 | <path | ||
| 161 | android:fillColor="#00000000" | ||
| 162 | android:pathData="M69,19L69,89" | ||
| 163 | android:strokeWidth="0.8" | ||
| 164 | android:strokeColor="#33FFFFFF" /> | ||
| 165 | <path | ||
| 166 | android:fillColor="#00000000" | ||
| 167 | android:pathData="M79,19L79,89" | ||
| 168 | android:strokeWidth="0.8" | ||
| 169 | android:strokeColor="#33FFFFFF" /> | ||
| 170 | </vector> | ||
| 171 |
app/src/main/res/drawable/select_b_1.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | <item android:drawable="@mipmap/hoss" android:state_checked="true" /> | ||
| 4 | <item android:drawable="@mipmap/hous" /> | ||
| 5 | |||
| 6 | </selector> |
app/src/main/res/drawable/select_b_2.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | <item android:drawable="@mipmap/wmss" android:state_checked="true" /> | ||
| 4 | <item android:drawable="@mipmap/wmus" /> | ||
| 5 | |||
| 6 | </selector> |
app/src/main/res/drawable/select_t_1.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | <item android:drawable="@color/c_1" android:state_checked="true" /> | ||
| 4 | <item android:drawable="@color/c_2" /> | ||
| 5 | |||
| 6 | </selector> |
app/src/main/res/drawable/welcome_bg.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | <!-- 设置整个屏幕背景为白色 --> | ||
| 4 | <item> | ||
| 5 | <color android:color="@android:color/white" /> | ||
| 6 | </item> | ||
| 7 | |||
| 8 | <!-- 中间logo --> | ||
| 9 | <item android:top="120dp"> | ||
| 10 | <bitmap | ||
| 11 | android:gravity="top|center_horizontal" | ||
| 12 | android:src="@mipmap/icon_qd" /> | ||
| 13 | </item> | ||
| 14 | |||
| 15 | |||
| 16 | <item android:top="470dp"> | ||
| 17 | <bitmap | ||
| 18 | android:gravity="top|center_horizontal" | ||
| 19 | android:src="@mipmap/abcdss" /> | ||
| 20 | </item> | ||
| 21 | |||
| 22 | </layer-list> |
app/src/main/res/layout/activity_add_stu.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="添加学生" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <TextView | ||
| 28 | android:id="@+id/tv_cancel" | ||
| 29 | android:layout_width="wrap_content" | ||
| 30 | android:layout_height="wrap_content" | ||
| 31 | android:text="取消" | ||
| 32 | android:textColor="#666666" | ||
| 33 | android:textSize="16dp" | ||
| 34 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 35 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 36 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 37 | android:layout_marginLeft="15dp" | ||
| 38 | /> | ||
| 39 | <ImageView | ||
| 40 | android:layout_width="75dp" | ||
| 41 | android:layout_height="75dp" | ||
| 42 | android:background="@mipmap/txz" | ||
| 43 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 44 | app:layout_constraintRight_toRightOf="parent" | ||
| 45 | app:layout_constraintTop_toBottomOf="@id/view_1" | ||
| 46 | android:layout_marginTop="32dp" | ||
| 47 | /> | ||
| 48 | |||
| 49 | <View | ||
| 50 | android:id="@+id/view_2" | ||
| 51 | android:layout_width="345dp" | ||
| 52 | android:layout_height="50dp" | ||
| 53 | android:background="@drawable/bg_solid_white_10" | ||
| 54 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 55 | app:layout_constraintRight_toRightOf="parent" | ||
| 56 | app:layout_constraintTop_toTopOf="parent" | ||
| 57 | android:layout_marginTop="195dp" | ||
| 58 | /> | ||
| 59 | |||
| 60 | <TextView | ||
| 61 | android:layout_width="wrap_content" | ||
| 62 | android:layout_height="wrap_content" | ||
| 63 | android:textColor="#666666" | ||
| 64 | android:textSize="16dp" | ||
| 65 | android:text="昵称" | ||
| 66 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 67 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 68 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 69 | android:layout_marginLeft="15dp" | ||
| 70 | /> | ||
| 71 | <ImageView | ||
| 72 | android:layout_width="5.5dp" | ||
| 73 | android:layout_height="9.5dp" | ||
| 74 | android:background="@mipmap/ycaj" | ||
| 75 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 76 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 77 | app:layout_constraintRight_toRightOf="@id/view_2" | ||
| 78 | android:layout_marginRight="15dp" | ||
| 79 | /> | ||
| 80 | |||
| 81 | <TextView | ||
| 82 | android:id="@+id/tv_name" | ||
| 83 | android:layout_width="wrap_content" | ||
| 84 | android:layout_height="wrap_content" | ||
| 85 | android:textColor="#999999" | ||
| 86 | android:textSize="16dp" | ||
| 87 | android:text="请输入" | ||
| 88 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 89 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 90 | app:layout_constraintRight_toRightOf="@id/view_2" | ||
| 91 | android:layout_marginRight="26dp" | ||
| 92 | /> | ||
| 93 | |||
| 94 | <View | ||
| 95 | android:id="@+id/view_3" | ||
| 96 | android:layout_width="345dp" | ||
| 97 | android:layout_height="50dp" | ||
| 98 | android:background="@drawable/bg_solid_white_10" | ||
| 99 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 100 | app:layout_constraintRight_toRightOf="parent" | ||
| 101 | app:layout_constraintTop_toTopOf="parent" | ||
| 102 | android:layout_marginTop="260dp" | ||
| 103 | /> | ||
| 104 | |||
| 105 | <TextView | ||
| 106 | android:layout_width="wrap_content" | ||
| 107 | android:layout_height="wrap_content" | ||
| 108 | android:textColor="#666666" | ||
| 109 | android:textSize="16dp" | ||
| 110 | android:text="性别" | ||
| 111 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 112 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 113 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 114 | android:layout_marginLeft="15dp" | ||
| 115 | /> | ||
| 116 | <ImageView | ||
| 117 | android:layout_width="5.5dp" | ||
| 118 | android:layout_height="9.5dp" | ||
| 119 | android:background="@mipmap/ycaj" | ||
| 120 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 121 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 122 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 123 | android:layout_marginRight="15dp" | ||
| 124 | /> | ||
| 125 | <TextView | ||
| 126 | android:id="@+id/tv_sex" | ||
| 127 | android:layout_width="wrap_content" | ||
| 128 | android:layout_height="wrap_content" | ||
| 129 | android:textColor="#999999" | ||
| 130 | android:textSize="16dp" | ||
| 131 | android:text="请选择" | ||
| 132 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 133 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 134 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 135 | android:layout_marginRight="26dp" | ||
| 136 | /> | ||
| 137 | |||
| 138 | <View | ||
| 139 | android:id="@+id/view_4" | ||
| 140 | android:layout_width="345dp" | ||
| 141 | android:layout_height="50dp" | ||
| 142 | android:background="@drawable/bg_solid_white_10" | ||
| 143 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 144 | app:layout_constraintRight_toRightOf="parent" | ||
| 145 | app:layout_constraintTop_toTopOf="parent" | ||
| 146 | android:layout_marginTop="325dp" | ||
| 147 | |||
| 148 | /> | ||
| 149 | |||
| 150 | <TextView | ||
| 151 | android:layout_width="wrap_content" | ||
| 152 | android:layout_height="wrap_content" | ||
| 153 | android:textColor="#666666" | ||
| 154 | android:textSize="16dp" | ||
| 155 | android:text="年级" | ||
| 156 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 157 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 158 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 159 | android:layout_marginLeft="15dp" | ||
| 160 | /> | ||
| 161 | <ImageView | ||
| 162 | android:layout_width="5.5dp" | ||
| 163 | android:layout_height="9.5dp" | ||
| 164 | android:background="@mipmap/ycaj" | ||
| 165 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 166 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 167 | app:layout_constraintRight_toRightOf="@id/view_4" | ||
| 168 | android:layout_marginRight="15dp" | ||
| 169 | /> | ||
| 170 | <TextView | ||
| 171 | android:id="@+id/tv_nian" | ||
| 172 | android:layout_width="wrap_content" | ||
| 173 | android:layout_height="wrap_content" | ||
| 174 | android:textColor="#999999" | ||
| 175 | android:textSize="16dp" | ||
| 176 | android:text="请选择" | ||
| 177 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 178 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 179 | app:layout_constraintRight_toRightOf="@id/view_4" | ||
| 180 | android:layout_marginRight="26dp" | ||
| 181 | /> | ||
| 182 | <View | ||
| 183 | android:id="@+id/view_5" | ||
| 184 | android:layout_width="345dp" | ||
| 185 | android:layout_height="50dp" | ||
| 186 | android:background="@drawable/bg_solid_white_10" | ||
| 187 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 188 | app:layout_constraintRight_toRightOf="parent" | ||
| 189 | app:layout_constraintTop_toTopOf="parent" | ||
| 190 | android:layout_marginTop="390dp" | ||
| 191 | |||
| 192 | /> | ||
| 193 | |||
| 194 | <TextView | ||
| 195 | |||
| 196 | android:layout_width="wrap_content" | ||
| 197 | android:layout_height="wrap_content" | ||
| 198 | android:textColor="#666666" | ||
| 199 | android:textSize="16dp" | ||
| 200 | android:text="家长身份" | ||
| 201 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 202 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 203 | app:layout_constraintLeft_toLeftOf="@id/view_5" | ||
| 204 | android:layout_marginLeft="15dp" | ||
| 205 | /> | ||
| 206 | <TextView | ||
| 207 | android:id="@+id/tv_shen" | ||
| 208 | android:layout_width="wrap_content" | ||
| 209 | android:layout_height="wrap_content" | ||
| 210 | android:textColor="#999999" | ||
| 211 | android:textSize="16dp" | ||
| 212 | android:text="请选择" | ||
| 213 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 214 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 215 | app:layout_constraintRight_toRightOf="@id/view_5" | ||
| 216 | android:layout_marginRight="26dp" | ||
| 217 | /> | ||
| 218 | <ImageView | ||
| 219 | android:layout_width="5.5dp" | ||
| 220 | android:layout_height="9.5dp" | ||
| 221 | android:background="@mipmap/ycaj" | ||
| 222 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 223 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 224 | app:layout_constraintRight_toRightOf="@id/view_5" | ||
| 225 | android:layout_marginRight="15dp" | ||
| 226 | /> | ||
| 227 | |||
| 228 | |||
| 229 | |||
| 230 | <Button | ||
| 231 | android:id="@+id/btn_next" | ||
| 232 | android:layout_width="180dp" | ||
| 233 | android:layout_height="40dp" | ||
| 234 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 235 | app:layout_constraintRight_toRightOf="parent" | ||
| 236 | app:layout_constraintTop_toTopOf="parent" | ||
| 237 | android:layout_marginTop="500dp" | ||
| 238 | android:background="@drawable/bg_solid_btn_grad" | ||
| 239 | android:text="确认" | ||
| 240 | android:textColor="#999999" | ||
| 241 | android:textSize="16dp" | ||
| 242 | /> | ||
| 243 | |||
| 244 | |||
| 245 | |||
| 246 | |||
| 247 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_changem.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="修改密码" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <ImageView | ||
| 28 | android:id="@+id/iv_back" | ||
| 29 | android:layout_width="10dp" | ||
| 30 | android:layout_height="16dp" | ||
| 31 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 32 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 33 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 34 | android:layout_marginLeft="15dp" | ||
| 35 | android:background="@mipmap/icon_back" | ||
| 36 | /> | ||
| 37 | <View | ||
| 38 | android:layout_width="match_parent" | ||
| 39 | android:layout_height="1dp" | ||
| 40 | android:background="#EEEEEE" | ||
| 41 | app:layout_constraintTop_toBottomOf="@id/view_1" | ||
| 42 | /> | ||
| 43 | |||
| 44 | <View | ||
| 45 | android:id="@+id/view_3" | ||
| 46 | android:layout_width="match_parent" | ||
| 47 | android:layout_height="45dp" | ||
| 48 | android:background="@android:color/white" | ||
| 49 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 50 | app:layout_constraintRight_toRightOf="parent" | ||
| 51 | app:layout_constraintTop_toTopOf="parent" | ||
| 52 | android:layout_marginTop="80dp" | ||
| 53 | /> | ||
| 54 | <ImageView | ||
| 55 | android:id="@+id/iv_3" | ||
| 56 | android:layout_width="20dp" | ||
| 57 | android:layout_height="16dp" | ||
| 58 | android:background="@mipmap/xs" | ||
| 59 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 60 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 61 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 62 | android:layout_marginRight="20dp" | ||
| 63 | /> | ||
| 64 | <TextView | ||
| 65 | android:id="@+id/tv_3" | ||
| 66 | android:layout_width="wrap_content" | ||
| 67 | android:layout_height="wrap_content" | ||
| 68 | android:text="请输入原密码" | ||
| 69 | android:textColor="#333333" | ||
| 70 | android:textSize="15dp" | ||
| 71 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 72 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 73 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 74 | android:layout_marginLeft="15dp" | ||
| 75 | /> | ||
| 76 | |||
| 77 | |||
| 78 | <EditText | ||
| 79 | android:layout_width="0dp" | ||
| 80 | android:layout_height="45dp" | ||
| 81 | android:background="@android:color/transparent" | ||
| 82 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 83 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 84 | app:layout_constraintLeft_toRightOf="@id/tv_3" | ||
| 85 | app:layout_constraintRight_toRightOf="parent" | ||
| 86 | android:layout_marginLeft="30dp" | ||
| 87 | android:layout_marginRight="50dp" | ||
| 88 | android:textSize="15dp" | ||
| 89 | android:gravity="left|center_vertical" | ||
| 90 | android:inputType="textPassword" | ||
| 91 | android:hint="请输入密码" | ||
| 92 | android:textColor="#333333" | ||
| 93 | android:textColorHint="#666666" | ||
| 94 | |||
| 95 | /> | ||
| 96 | |||
| 97 | <View | ||
| 98 | android:id="@+id/view_4" | ||
| 99 | android:layout_width="match_parent" | ||
| 100 | android:layout_height="45dp" | ||
| 101 | android:background="@android:color/white" | ||
| 102 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 103 | app:layout_constraintRight_toRightOf="parent" | ||
| 104 | app:layout_constraintTop_toTopOf="parent" | ||
| 105 | android:layout_marginTop="125dp" | ||
| 106 | /> | ||
| 107 | <ImageView | ||
| 108 | android:id="@+id/iv_4" | ||
| 109 | android:layout_width="20dp" | ||
| 110 | android:layout_height="16dp" | ||
| 111 | android:background="@mipmap/xs" | ||
| 112 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 113 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 114 | app:layout_constraintRight_toRightOf="@id/view_4" | ||
| 115 | android:layout_marginRight="20dp" | ||
| 116 | /> | ||
| 117 | <TextView | ||
| 118 | android:id="@+id/tv_4" | ||
| 119 | android:layout_width="wrap_content" | ||
| 120 | android:layout_height="wrap_content" | ||
| 121 | android:text="请输入新密码" | ||
| 122 | android:textColor="#333333" | ||
| 123 | android:textSize="15dp" | ||
| 124 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 125 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 126 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 127 | android:layout_marginLeft="15dp" | ||
| 128 | /> | ||
| 129 | |||
| 130 | |||
| 131 | <EditText | ||
| 132 | android:id="@+id/et_pwd" | ||
| 133 | android:layout_width="0dp" | ||
| 134 | android:layout_height="45dp" | ||
| 135 | android:background="@android:color/transparent" | ||
| 136 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 137 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 138 | app:layout_constraintLeft_toRightOf="@id/tv_4" | ||
| 139 | app:layout_constraintRight_toRightOf="parent" | ||
| 140 | android:layout_marginLeft="30dp" | ||
| 141 | android:layout_marginRight="50dp" | ||
| 142 | android:textSize="15dp" | ||
| 143 | android:gravity="left|center_vertical" | ||
| 144 | android:inputType="textPassword" | ||
| 145 | android:hint="请输入密码" | ||
| 146 | android:textColor="#333333" | ||
| 147 | android:textColorHint="#666666" | ||
| 148 | /> | ||
| 149 | |||
| 150 | |||
| 151 | <View | ||
| 152 | android:id="@+id/view_5" | ||
| 153 | android:layout_width="match_parent" | ||
| 154 | android:layout_height="45dp" | ||
| 155 | android:background="@android:color/white" | ||
| 156 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 157 | app:layout_constraintRight_toRightOf="parent" | ||
| 158 | app:layout_constraintTop_toTopOf="parent" | ||
| 159 | android:layout_marginTop="171dp" | ||
| 160 | /> | ||
| 161 | <ImageView | ||
| 162 | android:id="@+id/iv_5" | ||
| 163 | android:layout_width="20dp" | ||
| 164 | android:layout_height="16dp" | ||
| 165 | android:background="@mipmap/xs" | ||
| 166 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 167 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 168 | app:layout_constraintRight_toRightOf="@id/view_5" | ||
| 169 | android:layout_marginRight="20dp" | ||
| 170 | /> | ||
| 171 | <TextView | ||
| 172 | android:id="@+id/tv_5" | ||
| 173 | android:layout_width="wrap_content" | ||
| 174 | android:layout_height="wrap_content" | ||
| 175 | android:text="再次输入新密码" | ||
| 176 | android:textColor="#333333" | ||
| 177 | android:textSize="15dp" | ||
| 178 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 179 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 180 | app:layout_constraintLeft_toLeftOf="@id/view_5" | ||
| 181 | android:layout_marginLeft="15dp" | ||
| 182 | /> | ||
| 183 | |||
| 184 | |||
| 185 | <EditText | ||
| 186 | android:layout_width="0dp" | ||
| 187 | android:layout_height="45dp" | ||
| 188 | android:background="@android:color/transparent" | ||
| 189 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 190 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 191 | app:layout_constraintLeft_toRightOf="@id/tv_5" | ||
| 192 | app:layout_constraintRight_toRightOf="parent" | ||
| 193 | android:layout_marginLeft="15dp" | ||
| 194 | android:layout_marginRight="50dp" | ||
| 195 | android:textSize="15dp" | ||
| 196 | android:gravity="left|center_vertical" | ||
| 197 | android:inputType="textPassword" | ||
| 198 | android:hint="请再次输入密码" | ||
| 199 | android:textColor="#333333" | ||
| 200 | android:textColorHint="#666666" | ||
| 201 | /> | ||
| 202 | <TextView | ||
| 203 | android:layout_width="wrap_content" | ||
| 204 | android:layout_height="wrap_content" | ||
| 205 | android:text="6-16位密码,数字或字母" | ||
| 206 | android:textColor="#999999" | ||
| 207 | android:textSize="15dp" | ||
| 208 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 209 | app:layout_constraintTop_toTopOf="parent" | ||
| 210 | android:layout_marginTop="230dp" | ||
| 211 | android:layout_marginLeft="15dp" | ||
| 212 | /> | ||
| 213 | |||
| 214 | <Button | ||
| 215 | android:id="@+id/btn_next" | ||
| 216 | android:layout_width="180dp" | ||
| 217 | android:layout_height="40dp" | ||
| 218 | android:text="确认" | ||
| 219 | android:textColor="@color/white" | ||
| 220 | android:textSize="16dp" | ||
| 221 | android:background="@drawable/bg_solid_btn" | ||
| 222 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 223 | app:layout_constraintRight_toRightOf="parent" | ||
| 224 | app:layout_constraintTop_toTopOf="parent" | ||
| 225 | android:layout_marginTop="310dp" | ||
| 226 | /> | ||
| 227 | |||
| 228 | |||
| 229 | |||
| 230 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_login.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="@mipmap/bg" | ||
| 7 | > | ||
| 8 | |||
| 9 | |||
| 10 | |||
| 11 | <TextView | ||
| 12 | android:layout_width="wrap_content" | ||
| 13 | android:layout_height="wrap_content" | ||
| 14 | android:text="登陆" | ||
| 15 | android:textColor="#333333" | ||
| 16 | android:textStyle="bold" | ||
| 17 | android:textSize="25dp" | ||
| 18 | android:layout_marginLeft="30dp" | ||
| 19 | android:layout_marginTop="64dp" | ||
| 20 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 21 | app:layout_constraintTop_toTopOf="parent" | ||
| 22 | /> | ||
| 23 | |||
| 24 | <View | ||
| 25 | android:id="@+id/view_1" | ||
| 26 | android:layout_width="315dp" | ||
| 27 | android:layout_height="50dp" | ||
| 28 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 29 | app:layout_constraintRight_toRightOf="parent" | ||
| 30 | app:layout_constraintTop_toTopOf="parent" | ||
| 31 | android:layout_marginTop="166dp" | ||
| 32 | android:background="@drawable/bg_solid_white" | ||
| 33 | /> | ||
| 34 | |||
| 35 | <ImageView | ||
| 36 | android:id="@+id/iv_1" | ||
| 37 | android:layout_width="16dp" | ||
| 38 | android:layout_height="18dp" | ||
| 39 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 40 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 41 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 42 | android:background="@mipmap/sjh" | ||
| 43 | android:layout_marginLeft="20dp" | ||
| 44 | /> | ||
| 45 | |||
| 46 | <ImageView | ||
| 47 | android:id="@+id/iv_2" | ||
| 48 | android:layout_width="13dp" | ||
| 49 | android:layout_height="13dp" | ||
| 50 | android:background="@mipmap/sc" | ||
| 51 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 52 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 53 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 54 | android:layout_marginRight="20dp" | ||
| 55 | /> | ||
| 56 | |||
| 57 | <EditText | ||
| 58 | android:id="@+id/et_phone" | ||
| 59 | android:layout_width="0dp" | ||
| 60 | android:layout_height="0dp" | ||
| 61 | android:background="@android:color/transparent" | ||
| 62 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 63 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 64 | app:layout_constraintRight_toLeftOf="@id/iv_2" | ||
| 65 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 66 | android:textColorHint="#999999" | ||
| 67 | android:hint="请输入手机号" | ||
| 68 | android:textSize="16dp" | ||
| 69 | android:gravity="left|center_vertical" | ||
| 70 | android:inputType="number" | ||
| 71 | android:layout_marginLeft="46dp" | ||
| 72 | android:maxLength="11" | ||
| 73 | /> | ||
| 74 | |||
| 75 | |||
| 76 | <View | ||
| 77 | android:id="@+id/view_2" | ||
| 78 | android:layout_width="315dp" | ||
| 79 | android:layout_height="50dp" | ||
| 80 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 81 | app:layout_constraintRight_toRightOf="parent" | ||
| 82 | app:layout_constraintTop_toTopOf="parent" | ||
| 83 | android:layout_marginTop="241dp" | ||
| 84 | android:background="@drawable/bg_solid_white" | ||
| 85 | /> | ||
| 86 | |||
| 87 | <ImageView | ||
| 88 | android:id="@+id/iv_3" | ||
| 89 | android:layout_width="16dp" | ||
| 90 | android:layout_height="18dp" | ||
| 91 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 92 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 93 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 94 | android:background="@mipmap/mm" | ||
| 95 | android:layout_marginLeft="20dp" | ||
| 96 | /> | ||
| 97 | |||
| 98 | <ImageView | ||
| 99 | android:id="@+id/iv_4" | ||
| 100 | android:layout_width="20dp" | ||
| 101 | android:layout_height="16dp" | ||
| 102 | android:background="@mipmap/xs" | ||
| 103 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 104 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 105 | app:layout_constraintRight_toRightOf="@id/view_2" | ||
| 106 | android:layout_marginRight="20dp" | ||
| 107 | /> | ||
| 108 | |||
| 109 | <EditText | ||
| 110 | android:id="@+id/et_pwd" | ||
| 111 | android:layout_width="0dp" | ||
| 112 | android:layout_height="0dp" | ||
| 113 | android:background="@android:color/transparent" | ||
| 114 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 115 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 116 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 117 | app:layout_constraintRight_toLeftOf="@id/iv_4" | ||
| 118 | android:layout_marginLeft="46dp" | ||
| 119 | android:textColorHint="#999999" | ||
| 120 | android:hint="请输入密码" | ||
| 121 | android:textSize="16dp" | ||
| 122 | android:gravity="left|center_vertical" | ||
| 123 | android:inputType="textPassword" | ||
| 124 | android:layout_marginRight="20dp" | ||
| 125 | /> | ||
| 126 | |||
| 127 | |||
| 128 | <Button | ||
| 129 | android:id="@+id/btn_1" | ||
| 130 | android:layout_width="315dp" | ||
| 131 | android:layout_height="50dp" | ||
| 132 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 133 | app:layout_constraintRight_toRightOf="parent" | ||
| 134 | app:layout_constraintTop_toTopOf="parent" | ||
| 135 | android:layout_marginTop="331dp" | ||
| 136 | android:background="@drawable/bg_solid_btn" | ||
| 137 | android:textColor="@color/white" | ||
| 138 | android:textSize="18dp" | ||
| 139 | android:text="登陆" | ||
| 140 | /> | ||
| 141 | <TextView | ||
| 142 | android:id="@+id/tv_1" | ||
| 143 | android:layout_width="wrap_content" | ||
| 144 | android:layout_height="wrap_content" | ||
| 145 | android:text="没有账号,立即" | ||
| 146 | android:textColor="#666666" | ||
| 147 | android:textSize="17dp" | ||
| 148 | app:layout_constraintLeft_toLeftOf="@id/btn_1" | ||
| 149 | app:layout_constraintTop_toBottomOf="@id/btn_1" | ||
| 150 | android:layout_marginLeft="85dp" | ||
| 151 | android:layout_marginTop="15dp" | ||
| 152 | /> | ||
| 153 | <TextView | ||
| 154 | android:id="@+id/tv_2" | ||
| 155 | android:layout_width="wrap_content" | ||
| 156 | android:layout_height="wrap_content" | ||
| 157 | android:text="注册" | ||
| 158 | android:textColor="#FE5E09" | ||
| 159 | android:textSize="17dp" | ||
| 160 | app:layout_constraintLeft_toRightOf="@id/tv_1" | ||
| 161 | app:layout_constraintTop_toBottomOf="@id/btn_1" | ||
| 162 | android:layout_marginTop="15dp" | ||
| 163 | /> | ||
| 164 | |||
| 165 | |||
| 166 | <CheckBox | ||
| 167 | android:id="@+id/cb_1" | ||
| 168 | android:layout_width="13dp" | ||
| 169 | android:layout_height="13dp" | ||
| 170 | app:layout_constraintBottom_toBottomOf="parent" | ||
| 171 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 172 | android:layout_marginLeft="67dp" | ||
| 173 | android:layout_marginBottom="50dp" | ||
| 174 | android:background="@android:color/transparent" | ||
| 175 | android:button="@drawable/checked_xc" | ||
| 176 | /> | ||
| 177 | <TextView | ||
| 178 | android:id="@+id/tv_3" | ||
| 179 | android:layout_width="wrap_content" | ||
| 180 | android:layout_height="wrap_content" | ||
| 181 | android:text="已阅读并同意《" | ||
| 182 | android:textColor="#999999" | ||
| 183 | android:textSize="12dp" | ||
| 184 | app:layout_constraintLeft_toRightOf="@id/cb_1" | ||
| 185 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 186 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 187 | android:layout_marginLeft="5dp" | ||
| 188 | /> | ||
| 189 | <TextView | ||
| 190 | android:id="@+id/tv_4" | ||
| 191 | android:layout_width="wrap_content" | ||
| 192 | android:layout_height="wrap_content" | ||
| 193 | android:text="用户协议" | ||
| 194 | android:textColor="#FE5E09" | ||
| 195 | android:textSize="12dp" | ||
| 196 | app:layout_constraintLeft_toRightOf="@id/tv_3" | ||
| 197 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 198 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 199 | /> | ||
| 200 | <TextView | ||
| 201 | android:id="@+id/tv_5" | ||
| 202 | android:layout_width="wrap_content" | ||
| 203 | android:layout_height="wrap_content" | ||
| 204 | android:text="》和《" | ||
| 205 | android:textColor="#999999" | ||
| 206 | android:textSize="12dp" | ||
| 207 | app:layout_constraintLeft_toRightOf="@id/tv_4" | ||
| 208 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 209 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 210 | /> | ||
| 211 | <TextView | ||
| 212 | android:id="@+id/tv_6" | ||
| 213 | android:layout_width="wrap_content" | ||
| 214 | android:layout_height="wrap_content" | ||
| 215 | android:text="隐私政策" | ||
| 216 | android:textColor="#FE5E09" | ||
| 217 | android:textSize="12dp" | ||
| 218 | app:layout_constraintLeft_toRightOf="@id/tv_5" | ||
| 219 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 220 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 221 | /> | ||
| 222 | <TextView | ||
| 223 | android:id="@+id/tv_7" | ||
| 224 | android:layout_width="wrap_content" | ||
| 225 | android:layout_height="wrap_content" | ||
| 226 | android:text="》" | ||
| 227 | android:textColor="#999999" | ||
| 228 | android:textSize="12dp" | ||
| 229 | app:layout_constraintLeft_toRightOf="@id/tv_6" | ||
| 230 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 231 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 232 | /> | ||
| 233 | |||
| 234 | |||
| 235 | |||
| 236 | |||
| 237 | |||
| 238 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_main.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 4 | xmlns:tools="http://schemas.android.com/tools" | ||
| 5 | android:layout_width="match_parent" | ||
| 6 | android:layout_height="match_parent" | ||
| 7 | android:background="#F4F6F8" | ||
| 8 | tools:context=".MainActivity"> | ||
| 9 | |||
| 10 | <FrameLayout | ||
| 11 | android:id="@+id/rl_content" | ||
| 12 | android:layout_width="match_parent" | ||
| 13 | android:layout_height="0dp" | ||
| 14 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 15 | app:layout_constraintTop_toTopOf="parent" | ||
| 16 | app:layout_constraintBottom_toTopOf="@id/cl_1" | ||
| 17 | /> | ||
| 18 | |||
| 19 | |||
| 20 | <androidx.constraintlayout.widget.ConstraintLayout | ||
| 21 | android:id="@+id/cl_1" | ||
| 22 | android:layout_width="match_parent" | ||
| 23 | android:layout_height="50dp" | ||
| 24 | app:layout_constraintBottom_toBottomOf="parent" | ||
| 25 | android:background="@drawable/bg_solid_white_20" | ||
| 26 | > | ||
| 27 | |||
| 28 | <View | ||
| 29 | android:id="@+id/view_5" | ||
| 30 | android:layout_width="1dp" | ||
| 31 | android:layout_height="1dp" | ||
| 32 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 33 | app:layout_constraintRight_toRightOf="parent" | ||
| 34 | app:layout_constraintBottom_toBottomOf="parent" | ||
| 35 | /> | ||
| 36 | |||
| 37 | <androidx.constraintlayout.widget.ConstraintLayout | ||
| 38 | android:id="@+id/cl_home" | ||
| 39 | android:layout_width="0dp" | ||
| 40 | android:layout_height="0dp" | ||
| 41 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 42 | app:layout_constraintBottom_toBottomOf="parent" | ||
| 43 | app:layout_constraintTop_toTopOf="@id/cl_1" | ||
| 44 | app:layout_constraintRight_toRightOf="@id/view_5" | ||
| 45 | > | ||
| 46 | <ImageView | ||
| 47 | android:id="@+id/iv_3" | ||
| 48 | android:layout_width="27dp" | ||
| 49 | android:layout_height="24dp" | ||
| 50 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 51 | app:layout_constraintRight_toRightOf="parent" | ||
| 52 | app:layout_constraintTop_toTopOf="parent" | ||
| 53 | android:layout_marginTop="5dp" | ||
| 54 | android:background="@mipmap/hous" | ||
| 55 | /> | ||
| 56 | |||
| 57 | <TextView | ||
| 58 | android:id="@+id/tv_1" | ||
| 59 | android:layout_width="wrap_content" | ||
| 60 | android:layout_height="wrap_content" | ||
| 61 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 62 | app:layout_constraintRight_toRightOf="parent" | ||
| 63 | app:layout_constraintTop_toBottomOf="@id/iv_3" | ||
| 64 | android:layout_marginTop="5dp" | ||
| 65 | android:textSize="11dp" | ||
| 66 | android:textColor="@drawable/select_t_1" | ||
| 67 | android:text="首页" | ||
| 68 | /> | ||
| 69 | |||
| 70 | |||
| 71 | </androidx.constraintlayout.widget.ConstraintLayout> | ||
| 72 | <androidx.constraintlayout.widget.ConstraintLayout | ||
| 73 | android:id="@+id/cl_me" | ||
| 74 | android:layout_width="0dp" | ||
| 75 | android:layout_height="0dp" | ||
| 76 | app:layout_constraintLeft_toLeftOf="@id/view_5" | ||
| 77 | app:layout_constraintBottom_toBottomOf="parent" | ||
| 78 | app:layout_constraintTop_toTopOf="@id/cl_1" | ||
| 79 | app:layout_constraintRight_toRightOf="parent" | ||
| 80 | > | ||
| 81 | <ImageView | ||
| 82 | android:id="@+id/iv_4" | ||
| 83 | android:layout_width="22dp" | ||
| 84 | android:layout_height="25dp" | ||
| 85 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 86 | app:layout_constraintRight_toRightOf="parent" | ||
| 87 | app:layout_constraintTop_toTopOf="parent" | ||
| 88 | android:layout_marginTop="5dp" | ||
| 89 | android:background="@mipmap/wmus" | ||
| 90 | /> | ||
| 91 | |||
| 92 | <TextView | ||
| 93 | android:id="@+id/tv_4" | ||
| 94 | android:layout_width="wrap_content" | ||
| 95 | android:layout_height="wrap_content" | ||
| 96 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 97 | app:layout_constraintRight_toRightOf="parent" | ||
| 98 | app:layout_constraintTop_toBottomOf="@id/iv_4" | ||
| 99 | android:layout_marginTop="5dp" | ||
| 100 | android:textSize="11dp" | ||
| 101 | android:textColor="@drawable/select_t_1" | ||
| 102 | android:text="我的" | ||
| 103 | /> | ||
| 104 | |||
| 105 | </androidx.constraintlayout.widget.ConstraintLayout> | ||
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | </androidx.constraintlayout.widget.ConstraintLayout> | ||
| 110 | |||
| 111 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_me.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="关于我们" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <ImageView | ||
| 28 | android:id="@+id/iv_back" | ||
| 29 | android:layout_width="10dp" | ||
| 30 | android:layout_height="16dp" | ||
| 31 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 32 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 33 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 34 | android:layout_marginLeft="15dp" | ||
| 35 | android:background="@mipmap/icon_back" | ||
| 36 | /> | ||
| 37 | <View | ||
| 38 | android:layout_width="match_parent" | ||
| 39 | android:layout_height="1dp" | ||
| 40 | android:background="#EEEEEE" | ||
| 41 | app:layout_constraintTop_toBottomOf="@id/view_1" | ||
| 42 | /> | ||
| 43 | |||
| 44 | <View | ||
| 45 | android:id="@+id/view_3" | ||
| 46 | android:layout_width="345dp" | ||
| 47 | android:layout_height="68dp" | ||
| 48 | android:background="@drawable/bg_solid_white_10" | ||
| 49 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 50 | app:layout_constraintRight_toRightOf="parent" | ||
| 51 | app:layout_constraintTop_toTopOf="parent" | ||
| 52 | android:layout_marginTop="90dp" | ||
| 53 | /> | ||
| 54 | <TextView | ||
| 55 | android:layout_width="wrap_content" | ||
| 56 | android:layout_height="wrap_content" | ||
| 57 | android:text="我们的官网" | ||
| 58 | android:textColor="#333333" | ||
| 59 | android:textSize="15dp" | ||
| 60 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 61 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 62 | android:layout_marginLeft="15dp" | ||
| 63 | android:layout_marginTop="15dp" | ||
| 64 | /> | ||
| 65 | <TextView | ||
| 66 | android:layout_width="wrap_content" | ||
| 67 | android:layout_height="wrap_content" | ||
| 68 | android:text="www.hjx.com" | ||
| 69 | android:textColor="#666666" | ||
| 70 | android:textSize="13dp" | ||
| 71 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 72 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 73 | android:layout_marginLeft="15dp" | ||
| 74 | android:layout_marginBottom="15dp" | ||
| 75 | /> | ||
| 76 | |||
| 77 | <View | ||
| 78 | android:id="@+id/view_4" | ||
| 79 | android:layout_width="345dp" | ||
| 80 | android:layout_height="111dp" | ||
| 81 | android:background="@drawable/bg_solid_white_10" | ||
| 82 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 83 | app:layout_constraintRight_toRightOf="parent" | ||
| 84 | app:layout_constraintTop_toTopOf="parent" | ||
| 85 | android:layout_marginTop="173dp" | ||
| 86 | /> | ||
| 87 | <TextView | ||
| 88 | android:layout_width="wrap_content" | ||
| 89 | android:layout_height="wrap_content" | ||
| 90 | android:text="联系我们" | ||
| 91 | android:textColor="#333333" | ||
| 92 | android:textSize="15dp" | ||
| 93 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 94 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 95 | android:layout_marginLeft="15dp" | ||
| 96 | android:layout_marginTop="15dp" | ||
| 97 | /> | ||
| 98 | <TextView | ||
| 99 | android:id="@+id/tv_3" | ||
| 100 | android:layout_width="wrap_content" | ||
| 101 | android:layout_height="wrap_content" | ||
| 102 | android:text="邮箱: www.info@hjx.com" | ||
| 103 | android:textColor="#666666" | ||
| 104 | android:textSize="15dp" | ||
| 105 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 106 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 107 | android:layout_marginLeft="15dp" | ||
| 108 | android:layout_marginTop="44dp" | ||
| 109 | /> | ||
| 110 | <TextView | ||
| 111 | android:id="@+id/tv_4" | ||
| 112 | android:layout_width="wrap_content" | ||
| 113 | android:layout_height="wrap_content" | ||
| 114 | android:text="客服电话: 400-800-3813" | ||
| 115 | android:textColor="#666666" | ||
| 116 | android:textSize="15dp" | ||
| 117 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 118 | app:layout_constraintTop_toBottomOf="@id/tv_3" | ||
| 119 | android:layout_marginLeft="15dp" | ||
| 120 | /> | ||
| 121 | <TextView | ||
| 122 | android:layout_width="wrap_content" | ||
| 123 | android:layout_height="wrap_content" | ||
| 124 | android:text="地址: 上海市徐汇区桂箐路65号新研大厦B座701室" | ||
| 125 | android:textColor="#666666" | ||
| 126 | android:textSize="15dp" | ||
| 127 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 128 | app:layout_constraintTop_toBottomOf="@id/tv_4" | ||
| 129 | android:layout_marginLeft="15dp" | ||
| 130 | /> | ||
| 131 | |||
| 132 | <View | ||
| 133 | android:id="@+id/view_5" | ||
| 134 | android:layout_width="345dp" | ||
| 135 | android:layout_height="132dp" | ||
| 136 | android:background="@drawable/bg_solid_white_10" | ||
| 137 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 138 | app:layout_constraintRight_toRightOf="parent" | ||
| 139 | app:layout_constraintTop_toTopOf="parent" | ||
| 140 | android:layout_marginTop="299dp" | ||
| 141 | /> | ||
| 142 | <TextView | ||
| 143 | android:layout_width="wrap_content" | ||
| 144 | android:layout_height="wrap_content" | ||
| 145 | android:text="官方微信公众号" | ||
| 146 | android:textColor="#333333" | ||
| 147 | android:textSize="15dp" | ||
| 148 | app:layout_constraintLeft_toLeftOf="@id/view_5" | ||
| 149 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 150 | android:layout_marginLeft="15dp" | ||
| 151 | android:layout_marginTop="15dp" | ||
| 152 | /> | ||
| 153 | |||
| 154 | <ImageView | ||
| 155 | android:layout_width="73dp" | ||
| 156 | android:layout_height="73dp" | ||
| 157 | app:layout_constraintLeft_toLeftOf="@id/view_5" | ||
| 158 | app:layout_constraintRight_toRightOf="@id/view_5" | ||
| 159 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 160 | android:layout_marginBottom="15dp" | ||
| 161 | android:background="@mipmap/eco" | ||
| 162 | /> | ||
| 163 | |||
| 164 | |||
| 165 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_qr.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="扫码登陆" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <ImageView | ||
| 28 | android:id="@+id/iv_back" | ||
| 29 | android:layout_width="10dp" | ||
| 30 | android:layout_height="16dp" | ||
| 31 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 32 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 33 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 34 | android:layout_marginLeft="15dp" | ||
| 35 | android:background="@mipmap/icon_back" | ||
| 36 | /> | ||
| 37 | <View | ||
| 38 | android:layout_width="match_parent" | ||
| 39 | android:layout_height="1dp" | ||
| 40 | android:background="#EEEEEE" | ||
| 41 | app:layout_constraintTop_toBottomOf="@id/view_1" | ||
| 42 | /> | ||
| 43 | <FrameLayout | ||
| 44 | android:id="@+id/rl_content" | ||
| 45 | android:layout_width="match_parent" | ||
| 46 | android:layout_height="0dp" | ||
| 47 | app:layout_constraintBottom_toBottomOf="parent" | ||
| 48 | app:layout_constraintTop_toBottomOf="@id/view_1" | ||
| 49 | |||
| 50 | /> | ||
| 51 | |||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | |||
| 56 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_register.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="@mipmap/bg" | ||
| 7 | > | ||
| 8 | |||
| 9 | |||
| 10 | |||
| 11 | <TextView | ||
| 12 | android:layout_width="wrap_content" | ||
| 13 | android:layout_height="wrap_content" | ||
| 14 | android:text="注册" | ||
| 15 | android:textColor="#333333" | ||
| 16 | android:textStyle="bold" | ||
| 17 | android:textSize="25dp" | ||
| 18 | android:layout_marginLeft="30dp" | ||
| 19 | android:layout_marginTop="64dp" | ||
| 20 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 21 | app:layout_constraintTop_toTopOf="parent" | ||
| 22 | /> | ||
| 23 | |||
| 24 | <View | ||
| 25 | android:id="@+id/view_1" | ||
| 26 | android:layout_width="315dp" | ||
| 27 | android:layout_height="50dp" | ||
| 28 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 29 | app:layout_constraintRight_toRightOf="parent" | ||
| 30 | app:layout_constraintTop_toTopOf="parent" | ||
| 31 | android:layout_marginTop="166dp" | ||
| 32 | android:background="@drawable/bg_solid_white" | ||
| 33 | /> | ||
| 34 | |||
| 35 | <ImageView | ||
| 36 | android:id="@+id/iv_1" | ||
| 37 | android:layout_width="16dp" | ||
| 38 | android:layout_height="18dp" | ||
| 39 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 40 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 41 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 42 | android:background="@mipmap/sjh" | ||
| 43 | android:layout_marginLeft="20dp" | ||
| 44 | /> | ||
| 45 | |||
| 46 | <ImageView | ||
| 47 | android:id="@+id/iv_2" | ||
| 48 | android:layout_width="13dp" | ||
| 49 | android:layout_height="13dp" | ||
| 50 | android:background="@mipmap/sc" | ||
| 51 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 52 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 53 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 54 | android:layout_marginRight="20dp" | ||
| 55 | /> | ||
| 56 | |||
| 57 | <EditText | ||
| 58 | android:id="@+id/et_phone" | ||
| 59 | android:layout_width="0dp" | ||
| 60 | android:layout_height="0dp" | ||
| 61 | android:background="@android:color/transparent" | ||
| 62 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 63 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 64 | app:layout_constraintRight_toLeftOf="@id/iv_2" | ||
| 65 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 66 | android:textColorHint="#999999" | ||
| 67 | android:hint="请输入手机号" | ||
| 68 | android:textSize="16dp" | ||
| 69 | android:gravity="left|center_vertical" | ||
| 70 | android:inputType="number" | ||
| 71 | android:layout_marginLeft="46dp" | ||
| 72 | android:maxLength="11" | ||
| 73 | android:textColor="#333333" | ||
| 74 | /> | ||
| 75 | |||
| 76 | |||
| 77 | <View | ||
| 78 | android:id="@+id/view_2" | ||
| 79 | android:layout_width="315dp" | ||
| 80 | android:layout_height="50dp" | ||
| 81 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 82 | app:layout_constraintRight_toRightOf="parent" | ||
| 83 | app:layout_constraintTop_toTopOf="parent" | ||
| 84 | android:layout_marginTop="241dp" | ||
| 85 | android:background="@drawable/bg_solid_white" | ||
| 86 | /> | ||
| 87 | |||
| 88 | <ImageView | ||
| 89 | android:id="@+id/iv_3" | ||
| 90 | android:layout_width="16dp" | ||
| 91 | android:layout_height="18dp" | ||
| 92 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 93 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 94 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 95 | android:background="@mipmap/mm" | ||
| 96 | android:layout_marginLeft="20dp" | ||
| 97 | /> | ||
| 98 | |||
| 99 | <ImageView | ||
| 100 | android:id="@+id/iv_4" | ||
| 101 | android:layout_width="20dp" | ||
| 102 | android:layout_height="16dp" | ||
| 103 | android:background="@mipmap/xs" | ||
| 104 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 105 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 106 | app:layout_constraintRight_toRightOf="@id/view_2" | ||
| 107 | android:layout_marginRight="20dp" | ||
| 108 | /> | ||
| 109 | |||
| 110 | <EditText | ||
| 111 | android:id="@+id/et_pwd" | ||
| 112 | android:layout_width="0dp" | ||
| 113 | android:layout_height="0dp" | ||
| 114 | android:background="@android:color/transparent" | ||
| 115 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 116 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 117 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 118 | app:layout_constraintRight_toLeftOf="@id/iv_4" | ||
| 119 | android:layout_marginLeft="46dp" | ||
| 120 | android:textColorHint="#999999" | ||
| 121 | android:hint="请输入密码" | ||
| 122 | android:textSize="16dp" | ||
| 123 | android:gravity="left|center_vertical" | ||
| 124 | android:inputType="textPassword" | ||
| 125 | android:layout_marginRight="20dp" | ||
| 126 | android:textColor="#333333" | ||
| 127 | /> | ||
| 128 | |||
| 129 | |||
| 130 | <View | ||
| 131 | android:id="@+id/view_3" | ||
| 132 | android:layout_width="315dp" | ||
| 133 | android:layout_height="50dp" | ||
| 134 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 135 | app:layout_constraintRight_toRightOf="parent" | ||
| 136 | app:layout_constraintTop_toTopOf="parent" | ||
| 137 | android:layout_marginTop="316dp" | ||
| 138 | android:background="@drawable/bg_solid_white" | ||
| 139 | /> | ||
| 140 | |||
| 141 | <ImageView | ||
| 142 | android:id="@+id/iv_5" | ||
| 143 | android:layout_width="16dp" | ||
| 144 | android:layout_height="18dp" | ||
| 145 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 146 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 147 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 148 | android:background="@mipmap/mm" | ||
| 149 | android:layout_marginLeft="20dp" | ||
| 150 | /> | ||
| 151 | |||
| 152 | <ImageView | ||
| 153 | android:id="@+id/iv_6" | ||
| 154 | android:layout_width="20dp" | ||
| 155 | android:layout_height="16dp" | ||
| 156 | android:background="@mipmap/xs" | ||
| 157 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 158 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 159 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 160 | android:layout_marginRight="20dp" | ||
| 161 | /> | ||
| 162 | |||
| 163 | <EditText | ||
| 164 | android:id="@+id/et_pwd_2" | ||
| 165 | android:layout_width="0dp" | ||
| 166 | android:layout_height="0dp" | ||
| 167 | android:background="@android:color/transparent" | ||
| 168 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 169 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 170 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 171 | app:layout_constraintRight_toLeftOf="@id/iv_6" | ||
| 172 | android:layout_marginLeft="46dp" | ||
| 173 | android:textColorHint="#999999" | ||
| 174 | android:hint="再次输入密码" | ||
| 175 | android:textSize="16dp" | ||
| 176 | android:gravity="left|center_vertical" | ||
| 177 | android:inputType="textPassword" | ||
| 178 | android:layout_marginRight="20dp" | ||
| 179 | android:textColor="#333333" | ||
| 180 | /> | ||
| 181 | <TextView | ||
| 182 | android:layout_width="wrap_content" | ||
| 183 | android:layout_height="wrap_content" | ||
| 184 | app:layout_constraintTop_toBottomOf="@id/view_3" | ||
| 185 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 186 | android:layout_marginLeft="45dp" | ||
| 187 | android:layout_marginTop="10dp" | ||
| 188 | android:textSize="13dp" | ||
| 189 | android:text="6-16位密码,数字或字母" | ||
| 190 | android:textColor="#999999" | ||
| 191 | /> | ||
| 192 | |||
| 193 | <Button | ||
| 194 | android:id="@+id/btn_1" | ||
| 195 | android:layout_width="315dp" | ||
| 196 | android:layout_height="50dp" | ||
| 197 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 198 | app:layout_constraintRight_toRightOf="parent" | ||
| 199 | app:layout_constraintTop_toTopOf="parent" | ||
| 200 | android:layout_marginTop="428dp" | ||
| 201 | android:background="@drawable/bg_solid_btn" | ||
| 202 | android:textColor="@color/white" | ||
| 203 | android:textSize="18dp" | ||
| 204 | android:text="注册" | ||
| 205 | /> | ||
| 206 | <TextView | ||
| 207 | android:id="@+id/tv_1" | ||
| 208 | android:layout_width="wrap_content" | ||
| 209 | android:layout_height="wrap_content" | ||
| 210 | android:text="已有账号,立即" | ||
| 211 | android:textColor="#666666" | ||
| 212 | android:textSize="17dp" | ||
| 213 | app:layout_constraintLeft_toLeftOf="@id/btn_1" | ||
| 214 | app:layout_constraintTop_toBottomOf="@id/btn_1" | ||
| 215 | android:layout_marginLeft="85dp" | ||
| 216 | android:layout_marginTop="15dp" | ||
| 217 | /> | ||
| 218 | <TextView | ||
| 219 | android:id="@+id/tv_2" | ||
| 220 | android:layout_width="wrap_content" | ||
| 221 | android:layout_height="wrap_content" | ||
| 222 | android:text="登陆" | ||
| 223 | android:textColor="#FE5E09" | ||
| 224 | android:textSize="17dp" | ||
| 225 | app:layout_constraintLeft_toRightOf="@id/tv_1" | ||
| 226 | app:layout_constraintTop_toBottomOf="@id/btn_1" | ||
| 227 | android:layout_marginTop="15dp" | ||
| 228 | /> | ||
| 229 | |||
| 230 | |||
| 231 | <CheckBox | ||
| 232 | android:id="@+id/cb_1" | ||
| 233 | android:layout_width="13dp" | ||
| 234 | android:layout_height="13dp" | ||
| 235 | app:layout_constraintBottom_toBottomOf="parent" | ||
| 236 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 237 | android:layout_marginLeft="67dp" | ||
| 238 | android:layout_marginBottom="50dp" | ||
| 239 | android:background="@android:color/transparent" | ||
| 240 | android:button="@drawable/checked_xc" | ||
| 241 | /> | ||
| 242 | <TextView | ||
| 243 | android:id="@+id/tv_3" | ||
| 244 | android:layout_width="wrap_content" | ||
| 245 | android:layout_height="wrap_content" | ||
| 246 | android:text="已阅读并同意《" | ||
| 247 | android:textColor="#999999" | ||
| 248 | android:textSize="12dp" | ||
| 249 | app:layout_constraintLeft_toRightOf="@id/cb_1" | ||
| 250 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 251 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 252 | android:layout_marginLeft="5dp" | ||
| 253 | /> | ||
| 254 | <TextView | ||
| 255 | android:id="@+id/tv_4" | ||
| 256 | android:layout_width="wrap_content" | ||
| 257 | android:layout_height="wrap_content" | ||
| 258 | android:text="用户协议" | ||
| 259 | android:textColor="#FE5E09" | ||
| 260 | android:textSize="12dp" | ||
| 261 | app:layout_constraintLeft_toRightOf="@id/tv_3" | ||
| 262 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 263 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 264 | /> | ||
| 265 | <TextView | ||
| 266 | android:id="@+id/tv_5" | ||
| 267 | android:layout_width="wrap_content" | ||
| 268 | android:layout_height="wrap_content" | ||
| 269 | android:text="》和《" | ||
| 270 | android:textColor="#999999" | ||
| 271 | android:textSize="12dp" | ||
| 272 | app:layout_constraintLeft_toRightOf="@id/tv_4" | ||
| 273 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 274 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 275 | /> | ||
| 276 | <TextView | ||
| 277 | android:id="@+id/tv_6" | ||
| 278 | android:layout_width="wrap_content" | ||
| 279 | android:layout_height="wrap_content" | ||
| 280 | android:text="隐私政策" | ||
| 281 | android:textColor="#FE5E09" | ||
| 282 | android:textSize="12dp" | ||
| 283 | app:layout_constraintLeft_toRightOf="@id/tv_5" | ||
| 284 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 285 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 286 | /> | ||
| 287 | <TextView | ||
| 288 | android:id="@+id/tv_7" | ||
| 289 | android:layout_width="wrap_content" | ||
| 290 | android:layout_height="wrap_content" | ||
| 291 | android:text="》" | ||
| 292 | android:textColor="#999999" | ||
| 293 | android:textSize="12dp" | ||
| 294 | app:layout_constraintLeft_toRightOf="@id/tv_6" | ||
| 295 | app:layout_constraintTop_toTopOf="@id/cb_1" | ||
| 296 | app:layout_constraintBottom_toBottomOf="@id/cb_1" | ||
| 297 | /> | ||
| 298 | |||
| 299 | |||
| 300 | |||
| 301 | |||
| 302 | |||
| 303 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_sao.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="扫码登陆" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <ImageView | ||
| 28 | android:layout_width="10dp" | ||
| 29 | android:layout_height="16dp" | ||
| 30 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 31 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 32 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 33 | android:layout_marginLeft="15dp" | ||
| 34 | android:background="@mipmap/icon_back" | ||
| 35 | /> | ||
| 36 | |||
| 37 | |||
| 38 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_select_stu.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="选择学生" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | |||
| 28 | |||
| 29 | <Button | ||
| 30 | android:layout_width="180dp" | ||
| 31 | android:layout_height="40dp" | ||
| 32 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 33 | app:layout_constraintRight_toRightOf="parent" | ||
| 34 | app:layout_constraintTop_toTopOf="parent" | ||
| 35 | android:layout_marginTop="500dp" | ||
| 36 | android:background="@drawable/bg_solid_btn" | ||
| 37 | android:text="确认" | ||
| 38 | android:textColor="#FFFFFF" | ||
| 39 | android:textSize="16dp" | ||
| 40 | /> | ||
| 41 | |||
| 42 | |||
| 43 | |||
| 44 | |||
| 45 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_set_jia.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="家长身份" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <TextView | ||
| 28 | android:id="@+id/tv_cancel" | ||
| 29 | android:layout_width="wrap_content" | ||
| 30 | android:layout_height="wrap_content" | ||
| 31 | android:text="取消" | ||
| 32 | android:textColor="#666666" | ||
| 33 | android:textSize="16dp" | ||
| 34 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 35 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 36 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 37 | android:layout_marginLeft="15dp" | ||
| 38 | /> | ||
| 39 | <TextView | ||
| 40 | android:id="@+id/tv_ok" | ||
| 41 | android:layout_width="wrap_content" | ||
| 42 | android:layout_height="wrap_content" | ||
| 43 | android:text="确认" | ||
| 44 | android:textColor="#FE5E09" | ||
| 45 | android:textSize="16dp" | ||
| 46 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 47 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 48 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 49 | android:layout_marginRight="15dp" | ||
| 50 | /> | ||
| 51 | <TextView | ||
| 52 | android:layout_width="wrap_content" | ||
| 53 | android:layout_height="wrap_content" | ||
| 54 | android:text="请选择身份" | ||
| 55 | app:layout_constraintBottom_toTopOf="@id/view_2" | ||
| 56 | android:layout_marginBottom="15dp" | ||
| 57 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 58 | android:layout_marginLeft="15dp" | ||
| 59 | android:textColor="#666666" | ||
| 60 | android:textSize="16dp" | ||
| 61 | /> | ||
| 62 | |||
| 63 | <View | ||
| 64 | android:id="@+id/view_2" | ||
| 65 | android:layout_width="345dp" | ||
| 66 | android:layout_height="50dp" | ||
| 67 | android:background="@drawable/bg_solid_white_10" | ||
| 68 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 69 | app:layout_constraintRight_toRightOf="parent" | ||
| 70 | app:layout_constraintTop_toTopOf="parent" | ||
| 71 | android:layout_marginTop="109dp" | ||
| 72 | /> | ||
| 73 | |||
| 74 | |||
| 75 | <TextView | ||
| 76 | android:layout_width="wrap_content" | ||
| 77 | android:layout_height="wrap_content" | ||
| 78 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 79 | app:layout_constraintRight_toRightOf="@id/view_2" | ||
| 80 | app:layout_constraintTop_toTopOf="@+id/view_2" | ||
| 81 | app:layout_constraintBottom_toBottomOf="@+id/view_2" | ||
| 82 | android:textColor="#333333" | ||
| 83 | android:textSize="16dp" | ||
| 84 | android:text="爸爸" | ||
| 85 | /> | ||
| 86 | |||
| 87 | <ImageView | ||
| 88 | android:id="@+id/iv_1" | ||
| 89 | android:layout_width="13dp" | ||
| 90 | android:layout_height="13dp" | ||
| 91 | android:background="@mipmap/wsyq" | ||
| 92 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 93 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 94 | app:layout_constraintRight_toRightOf="@id/view_2" | ||
| 95 | android:layout_marginRight="20dp" | ||
| 96 | /> | ||
| 97 | |||
| 98 | <View | ||
| 99 | android:id="@+id/view_3" | ||
| 100 | android:layout_width="345dp" | ||
| 101 | android:layout_height="50dp" | ||
| 102 | android:background="@drawable/bg_solid_white_10" | ||
| 103 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 104 | app:layout_constraintRight_toRightOf="parent" | ||
| 105 | app:layout_constraintTop_toTopOf="parent" | ||
| 106 | android:layout_marginTop="175dp" | ||
| 107 | /> | ||
| 108 | |||
| 109 | |||
| 110 | <TextView | ||
| 111 | android:layout_width="wrap_content" | ||
| 112 | android:layout_height="wrap_content" | ||
| 113 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 114 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 115 | app:layout_constraintTop_toTopOf="@+id/view_3" | ||
| 116 | app:layout_constraintBottom_toBottomOf="@+id/view_3" | ||
| 117 | android:textColor="#333333" | ||
| 118 | android:textSize="16dp" | ||
| 119 | android:text="妈妈" | ||
| 120 | /> | ||
| 121 | |||
| 122 | <ImageView | ||
| 123 | android:id="@+id/iv_2" | ||
| 124 | android:layout_width="13dp" | ||
| 125 | android:layout_height="13dp" | ||
| 126 | android:background="@mipmap/wsyq" | ||
| 127 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 128 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 129 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 130 | android:layout_marginRight="20dp" | ||
| 131 | /> | ||
| 132 | <View | ||
| 133 | android:id="@+id/view_4" | ||
| 134 | android:layout_width="345dp" | ||
| 135 | android:layout_height="50dp" | ||
| 136 | android:background="@drawable/bg_solid_white_10" | ||
| 137 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 138 | app:layout_constraintRight_toRightOf="parent" | ||
| 139 | app:layout_constraintTop_toTopOf="parent" | ||
| 140 | android:layout_marginTop="240dp" | ||
| 141 | /> | ||
| 142 | |||
| 143 | |||
| 144 | <TextView | ||
| 145 | android:layout_width="wrap_content" | ||
| 146 | android:layout_height="wrap_content" | ||
| 147 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 148 | app:layout_constraintRight_toRightOf="@id/view_4" | ||
| 149 | app:layout_constraintTop_toTopOf="@+id/view_4" | ||
| 150 | app:layout_constraintBottom_toBottomOf="@+id/view_4" | ||
| 151 | android:textColor="#333333" | ||
| 152 | android:textSize="16dp" | ||
| 153 | android:text="爷爷" | ||
| 154 | /> | ||
| 155 | |||
| 156 | <ImageView | ||
| 157 | android:id="@+id/iv_3" | ||
| 158 | android:layout_width="13dp" | ||
| 159 | android:layout_height="13dp" | ||
| 160 | android:background="@mipmap/wsyq" | ||
| 161 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 162 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 163 | app:layout_constraintRight_toRightOf="@id/view_4" | ||
| 164 | android:layout_marginRight="20dp" | ||
| 165 | /> | ||
| 166 | <View | ||
| 167 | android:id="@+id/view_5" | ||
| 168 | android:layout_width="345dp" | ||
| 169 | android:layout_height="50dp" | ||
| 170 | android:background="@drawable/bg_solid_white_10" | ||
| 171 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 172 | app:layout_constraintRight_toRightOf="parent" | ||
| 173 | app:layout_constraintTop_toTopOf="parent" | ||
| 174 | android:layout_marginTop="304dp" | ||
| 175 | /> | ||
| 176 | |||
| 177 | |||
| 178 | <TextView | ||
| 179 | android:layout_width="wrap_content" | ||
| 180 | android:layout_height="wrap_content" | ||
| 181 | app:layout_constraintLeft_toLeftOf="@id/view_5" | ||
| 182 | app:layout_constraintRight_toRightOf="@id/view_5" | ||
| 183 | app:layout_constraintTop_toTopOf="@+id/view_5" | ||
| 184 | app:layout_constraintBottom_toBottomOf="@+id/view_5" | ||
| 185 | android:textColor="#333333" | ||
| 186 | android:textSize="16dp" | ||
| 187 | android:text="奶奶" | ||
| 188 | /> | ||
| 189 | |||
| 190 | <ImageView | ||
| 191 | android:id="@+id/iv_4" | ||
| 192 | android:layout_width="13dp" | ||
| 193 | android:layout_height="13dp" | ||
| 194 | android:background="@mipmap/wsyq" | ||
| 195 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 196 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 197 | app:layout_constraintRight_toRightOf="@id/view_5" | ||
| 198 | android:layout_marginRight="20dp" | ||
| 199 | /> | ||
| 200 | <View | ||
| 201 | android:id="@+id/view_6" | ||
| 202 | android:layout_width="345dp" | ||
| 203 | android:layout_height="50dp" | ||
| 204 | android:background="@drawable/bg_solid_white_10" | ||
| 205 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 206 | app:layout_constraintRight_toRightOf="parent" | ||
| 207 | app:layout_constraintTop_toTopOf="parent" | ||
| 208 | android:layout_marginTop="370dp" | ||
| 209 | /> | ||
| 210 | |||
| 211 | |||
| 212 | <TextView | ||
| 213 | android:layout_width="wrap_content" | ||
| 214 | android:layout_height="wrap_content" | ||
| 215 | app:layout_constraintLeft_toLeftOf="@id/view_6" | ||
| 216 | app:layout_constraintRight_toRightOf="@id/view_6" | ||
| 217 | app:layout_constraintTop_toTopOf="@+id/view_6" | ||
| 218 | app:layout_constraintBottom_toBottomOf="@+id/view_6" | ||
| 219 | android:textColor="#333333" | ||
| 220 | android:textSize="16dp" | ||
| 221 | android:text="外公" | ||
| 222 | /> | ||
| 223 | |||
| 224 | <ImageView | ||
| 225 | android:id="@+id/iv_5" | ||
| 226 | android:layout_width="13dp" | ||
| 227 | android:layout_height="13dp" | ||
| 228 | android:background="@mipmap/wsyq" | ||
| 229 | app:layout_constraintTop_toTopOf="@id/view_6" | ||
| 230 | app:layout_constraintBottom_toBottomOf="@id/view_6" | ||
| 231 | app:layout_constraintRight_toRightOf="@id/view_6" | ||
| 232 | android:layout_marginRight="20dp" | ||
| 233 | /> | ||
| 234 | <View | ||
| 235 | android:id="@+id/view_7" | ||
| 236 | android:layout_width="345dp" | ||
| 237 | android:layout_height="50dp" | ||
| 238 | android:background="@drawable/bg_solid_white_10" | ||
| 239 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 240 | app:layout_constraintRight_toRightOf="parent" | ||
| 241 | app:layout_constraintTop_toTopOf="parent" | ||
| 242 | android:layout_marginTop="434dp" | ||
| 243 | /> | ||
| 244 | |||
| 245 | |||
| 246 | <TextView | ||
| 247 | android:layout_width="wrap_content" | ||
| 248 | android:layout_height="wrap_content" | ||
| 249 | app:layout_constraintLeft_toLeftOf="@id/view_7" | ||
| 250 | app:layout_constraintRight_toRightOf="@id/view_7" | ||
| 251 | app:layout_constraintTop_toTopOf="@+id/view_7" | ||
| 252 | app:layout_constraintBottom_toBottomOf="@+id/view_7" | ||
| 253 | android:textColor="#333333" | ||
| 254 | android:textSize="16dp" | ||
| 255 | android:text="外婆" | ||
| 256 | /> | ||
| 257 | |||
| 258 | <ImageView | ||
| 259 | android:id="@+id/iv_6" | ||
| 260 | android:layout_width="13dp" | ||
| 261 | android:layout_height="13dp" | ||
| 262 | android:background="@mipmap/wsyq" | ||
| 263 | app:layout_constraintTop_toTopOf="@id/view_7" | ||
| 264 | app:layout_constraintBottom_toBottomOf="@id/view_7" | ||
| 265 | app:layout_constraintRight_toRightOf="@id/view_7" | ||
| 266 | android:layout_marginRight="20dp" | ||
| 267 | /> | ||
| 268 | |||
| 269 | |||
| 270 | |||
| 271 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_set_nian.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="年级" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <TextView | ||
| 28 | android:id="@+id/tv_cancel" | ||
| 29 | android:layout_width="wrap_content" | ||
| 30 | android:layout_height="wrap_content" | ||
| 31 | android:text="取消" | ||
| 32 | android:textColor="#666666" | ||
| 33 | android:textSize="16dp" | ||
| 34 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 35 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 36 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 37 | android:layout_marginLeft="15dp" | ||
| 38 | /> | ||
| 39 | <TextView | ||
| 40 | android:id="@+id/tv_ok" | ||
| 41 | android:layout_width="wrap_content" | ||
| 42 | android:layout_height="wrap_content" | ||
| 43 | android:text="确认" | ||
| 44 | android:textColor="#FE5E09" | ||
| 45 | android:textSize="16dp" | ||
| 46 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 47 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 48 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 49 | android:layout_marginRight="15dp" | ||
| 50 | /> | ||
| 51 | <TextView | ||
| 52 | android:layout_width="wrap_content" | ||
| 53 | android:layout_height="wrap_content" | ||
| 54 | android:text="请选择年级" | ||
| 55 | app:layout_constraintBottom_toTopOf="@id/view_2" | ||
| 56 | android:layout_marginBottom="15dp" | ||
| 57 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 58 | android:layout_marginLeft="15dp" | ||
| 59 | android:textColor="#666666" | ||
| 60 | android:textSize="16dp" | ||
| 61 | /> | ||
| 62 | |||
| 63 | <View | ||
| 64 | android:id="@+id/view_2" | ||
| 65 | android:layout_width="345dp" | ||
| 66 | android:layout_height="50dp" | ||
| 67 | android:background="@drawable/bg_solid_white_10" | ||
| 68 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 69 | app:layout_constraintRight_toRightOf="parent" | ||
| 70 | app:layout_constraintTop_toTopOf="parent" | ||
| 71 | android:layout_marginTop="109dp" | ||
| 72 | /> | ||
| 73 | |||
| 74 | |||
| 75 | <TextView | ||
| 76 | android:id="@+id/tv_nian" | ||
| 77 | android:layout_width="wrap_content" | ||
| 78 | android:layout_height="wrap_content" | ||
| 79 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 80 | app:layout_constraintTop_toTopOf="@+id/view_2" | ||
| 81 | app:layout_constraintBottom_toBottomOf="@+id/view_2" | ||
| 82 | android:textColor="#333333" | ||
| 83 | android:textSize="16dp" | ||
| 84 | android:text="一年纪" | ||
| 85 | android:layout_marginLeft="15dp" | ||
| 86 | /> | ||
| 87 | |||
| 88 | <ImageView | ||
| 89 | android:layout_width="5.5dp" | ||
| 90 | android:layout_height="9.5dp" | ||
| 91 | android:background="@mipmap/ycaj" | ||
| 92 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 93 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 94 | app:layout_constraintRight_toRightOf="@id/view_2" | ||
| 95 | android:layout_marginRight="15dp" | ||
| 96 | /> | ||
| 97 | |||
| 98 | <TextView | ||
| 99 | android:layout_width="wrap_content" | ||
| 100 | android:layout_height="wrap_content" | ||
| 101 | android:text="请选择学期" | ||
| 102 | app:layout_constraintBottom_toTopOf="@id/view_3" | ||
| 103 | android:layout_marginBottom="15dp" | ||
| 104 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 105 | android:layout_marginLeft="15dp" | ||
| 106 | android:textColor="#666666" | ||
| 107 | android:textSize="16dp" | ||
| 108 | /> | ||
| 109 | |||
| 110 | <View | ||
| 111 | android:id="@+id/view_3" | ||
| 112 | android:layout_width="345dp" | ||
| 113 | android:layout_height="50dp" | ||
| 114 | android:background="@drawable/bg_solid_white_10" | ||
| 115 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 116 | app:layout_constraintRight_toRightOf="parent" | ||
| 117 | app:layout_constraintTop_toTopOf="parent" | ||
| 118 | android:layout_marginTop="209dp" | ||
| 119 | /> | ||
| 120 | |||
| 121 | <ImageView | ||
| 122 | android:layout_width="5.5dp" | ||
| 123 | android:layout_height="9.5dp" | ||
| 124 | android:background="@mipmap/ycaj" | ||
| 125 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 126 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 127 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 128 | android:layout_marginRight="15dp" | ||
| 129 | /> | ||
| 130 | |||
| 131 | <TextView | ||
| 132 | android:id="@+id/tv_xq" | ||
| 133 | android:layout_width="wrap_content" | ||
| 134 | android:layout_height="wrap_content" | ||
| 135 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 136 | app:layout_constraintTop_toTopOf="@+id/view_3" | ||
| 137 | app:layout_constraintBottom_toBottomOf="@+id/view_3" | ||
| 138 | android:textColor="#333333" | ||
| 139 | android:textSize="16dp" | ||
| 140 | android:text="上学期" | ||
| 141 | android:layout_marginLeft="15dp" | ||
| 142 | /> | ||
| 143 | |||
| 144 | |||
| 145 | |||
| 146 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_set_nick.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="昵称" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <TextView | ||
| 28 | android:id="@+id/tv_cancel" | ||
| 29 | android:layout_width="wrap_content" | ||
| 30 | android:layout_height="wrap_content" | ||
| 31 | android:text="取消" | ||
| 32 | android:textColor="#666666" | ||
| 33 | android:textSize="16dp" | ||
| 34 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 35 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 36 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 37 | android:layout_marginLeft="15dp" | ||
| 38 | /> | ||
| 39 | <TextView | ||
| 40 | android:id="@+id/tv_ok" | ||
| 41 | android:layout_width="wrap_content" | ||
| 42 | android:layout_height="wrap_content" | ||
| 43 | android:text="确认" | ||
| 44 | android:textColor="#FE5E09" | ||
| 45 | android:textSize="16dp" | ||
| 46 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 47 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 48 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 49 | android:layout_marginRight="15dp" | ||
| 50 | /> | ||
| 51 | |||
| 52 | |||
| 53 | <View | ||
| 54 | android:id="@+id/view_3" | ||
| 55 | android:layout_width="345dp" | ||
| 56 | android:layout_height="50dp" | ||
| 57 | android:background="@drawable/bg_solid_white_10" | ||
| 58 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 59 | app:layout_constraintRight_toRightOf="parent" | ||
| 60 | app:layout_constraintTop_toTopOf="parent" | ||
| 61 | android:layout_marginTop="109dp" | ||
| 62 | /> | ||
| 63 | <EditText | ||
| 64 | android:id="@+id/et_1" | ||
| 65 | android:layout_width="0dp" | ||
| 66 | android:layout_height="0dp" | ||
| 67 | app:layout_constraintLeft_toLeftOf="@+id/view_3" | ||
| 68 | app:layout_constraintRight_toRightOf="@+id/view_3" | ||
| 69 | app:layout_constraintTop_toTopOf="@+id/view_3" | ||
| 70 | app:layout_constraintBottom_toBottomOf="@+id/view_3" | ||
| 71 | android:layout_marginLeft="5dp" | ||
| 72 | android:layout_marginRight="5dp" | ||
| 73 | android:textSize="16dp" | ||
| 74 | android:textColorHint="#999999" | ||
| 75 | android:hint="请设置2-10个字符,不包括无效字符" | ||
| 76 | android:textColor="#333333" | ||
| 77 | /> | ||
| 78 | |||
| 79 | <TextView | ||
| 80 | android:layout_width="wrap_content" | ||
| 81 | android:layout_height="wrap_content" | ||
| 82 | android:text="请输入昵称" | ||
| 83 | app:layout_constraintBottom_toTopOf="@id/et_1" | ||
| 84 | android:layout_marginBottom="15dp" | ||
| 85 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 86 | android:layout_marginLeft="15dp" | ||
| 87 | /> | ||
| 88 | |||
| 89 | |||
| 90 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_set_sex.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="性别" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <TextView | ||
| 28 | android:id="@+id/tv_cancel" | ||
| 29 | android:layout_width="wrap_content" | ||
| 30 | android:layout_height="wrap_content" | ||
| 31 | android:text="取消" | ||
| 32 | android:textColor="#666666" | ||
| 33 | android:textSize="16dp" | ||
| 34 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 35 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 36 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 37 | android:layout_marginLeft="15dp" | ||
| 38 | /> | ||
| 39 | <TextView | ||
| 40 | android:id="@+id/tv_ok" | ||
| 41 | android:layout_width="wrap_content" | ||
| 42 | android:layout_height="wrap_content" | ||
| 43 | android:text="确认" | ||
| 44 | android:textColor="#FE5E09" | ||
| 45 | android:textSize="16dp" | ||
| 46 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 47 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 48 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 49 | android:layout_marginRight="15dp" | ||
| 50 | /> | ||
| 51 | |||
| 52 | |||
| 53 | <View | ||
| 54 | android:id="@+id/view_2" | ||
| 55 | android:layout_width="345dp" | ||
| 56 | android:layout_height="50dp" | ||
| 57 | android:background="@drawable/bg_solid_white_10" | ||
| 58 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 59 | app:layout_constraintRight_toRightOf="parent" | ||
| 60 | app:layout_constraintTop_toTopOf="parent" | ||
| 61 | android:layout_marginTop="109dp" | ||
| 62 | /> | ||
| 63 | |||
| 64 | <ImageView | ||
| 65 | android:id="@+id/cb_1" | ||
| 66 | android:layout_width="13dp" | ||
| 67 | android:layout_height="13dp" | ||
| 68 | android:background="@mipmap/wsyq" | ||
| 69 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 70 | app:layout_constraintBottom_toBottomOf="@id/view_2" | ||
| 71 | app:layout_constraintRight_toRightOf="@id/view_2" | ||
| 72 | android:layout_marginRight="20dp" | ||
| 73 | /> | ||
| 74 | |||
| 75 | <ImageView | ||
| 76 | android:id="@+id/iv_1" | ||
| 77 | android:layout_width="10dp" | ||
| 78 | android:layout_height="14dp" | ||
| 79 | android:background="@mipmap/xb_nv" | ||
| 80 | app:layout_constraintTop_toTopOf="@+id/view_2" | ||
| 81 | app:layout_constraintBottom_toBottomOf="@+id/view_2" | ||
| 82 | app:layout_constraintLeft_toLeftOf="@+id/view_2" | ||
| 83 | android:layout_marginLeft="161dp" | ||
| 84 | /> | ||
| 85 | <TextView | ||
| 86 | android:layout_width="wrap_content" | ||
| 87 | android:layout_height="wrap_content" | ||
| 88 | app:layout_constraintLeft_toRightOf="@id/iv_1" | ||
| 89 | app:layout_constraintTop_toTopOf="@+id/iv_1" | ||
| 90 | app:layout_constraintBottom_toBottomOf="@+id/iv_1" | ||
| 91 | android:textColor="#333333" | ||
| 92 | android:textSize="16dp" | ||
| 93 | android:text="女" | ||
| 94 | android:layout_marginLeft="5dp" | ||
| 95 | /> | ||
| 96 | |||
| 97 | <TextView | ||
| 98 | android:layout_width="wrap_content" | ||
| 99 | android:layout_height="wrap_content" | ||
| 100 | android:text="请选择性别" | ||
| 101 | app:layout_constraintBottom_toTopOf="@id/view_2" | ||
| 102 | android:layout_marginBottom="15dp" | ||
| 103 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 104 | android:layout_marginLeft="15dp" | ||
| 105 | android:textColor="#666666" | ||
| 106 | android:textSize="16dp" | ||
| 107 | /> | ||
| 108 | |||
| 109 | <View | ||
| 110 | android:id="@+id/view_3" | ||
| 111 | android:layout_width="345dp" | ||
| 112 | android:layout_height="50dp" | ||
| 113 | android:background="@drawable/bg_solid_white_10" | ||
| 114 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 115 | app:layout_constraintRight_toRightOf="parent" | ||
| 116 | app:layout_constraintTop_toTopOf="parent" | ||
| 117 | android:layout_marginTop="174dp" | ||
| 118 | /> | ||
| 119 | |||
| 120 | <ImageView | ||
| 121 | android:id="@+id/cb_2" | ||
| 122 | android:layout_width="13dp" | ||
| 123 | android:layout_height="13dp" | ||
| 124 | android:background="@mipmap/wsyq" | ||
| 125 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 126 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 127 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 128 | android:layout_marginRight="20dp" | ||
| 129 | /> | ||
| 130 | <ImageView | ||
| 131 | android:id="@+id/iv_2" | ||
| 132 | android:layout_width="10dp" | ||
| 133 | android:layout_height="14dp" | ||
| 134 | android:background="@mipmap/xb_n" | ||
| 135 | app:layout_constraintTop_toTopOf="@+id/view_3" | ||
| 136 | app:layout_constraintBottom_toBottomOf="@+id/view_3" | ||
| 137 | app:layout_constraintLeft_toLeftOf="@+id/view_3" | ||
| 138 | android:layout_marginLeft="161dp" | ||
| 139 | /> | ||
| 140 | <TextView | ||
| 141 | android:layout_width="wrap_content" | ||
| 142 | android:layout_height="wrap_content" | ||
| 143 | app:layout_constraintLeft_toRightOf="@id/iv_2" | ||
| 144 | app:layout_constraintTop_toTopOf="@+id/iv_2" | ||
| 145 | app:layout_constraintBottom_toBottomOf="@+id/iv_2" | ||
| 146 | android:textColor="#333333" | ||
| 147 | android:textSize="16dp" | ||
| 148 | android:text="男" | ||
| 149 | android:layout_marginLeft="5dp" | ||
| 150 | /> | ||
| 151 | |||
| 152 | |||
| 153 | |||
| 154 | |||
| 155 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_setac.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="账号设置" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <ImageView | ||
| 28 | android:id="@+id/iv_back" | ||
| 29 | android:layout_width="10dp" | ||
| 30 | android:layout_height="16dp" | ||
| 31 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 32 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 33 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 34 | android:layout_marginLeft="15dp" | ||
| 35 | android:background="@mipmap/icon_back" | ||
| 36 | /> | ||
| 37 | <View | ||
| 38 | android:layout_width="match_parent" | ||
| 39 | android:layout_height="1dp" | ||
| 40 | android:background="#EEEEEE" | ||
| 41 | app:layout_constraintTop_toBottomOf="@id/view_1" | ||
| 42 | /> | ||
| 43 | |||
| 44 | <View | ||
| 45 | android:id="@+id/view_3" | ||
| 46 | android:layout_width="345dp" | ||
| 47 | android:layout_height="80dp" | ||
| 48 | android:background="@drawable/bg_solid_white_10" | ||
| 49 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 50 | app:layout_constraintRight_toRightOf="parent" | ||
| 51 | app:layout_constraintTop_toTopOf="parent" | ||
| 52 | android:layout_marginTop="90dp" | ||
| 53 | /> | ||
| 54 | <ImageView | ||
| 55 | android:id="@+id/iv_3" | ||
| 56 | android:layout_width="57dp" | ||
| 57 | android:layout_height="57dp" | ||
| 58 | android:background="@mipmap/txz" | ||
| 59 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 60 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 61 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 62 | android:layout_marginRight="31dp" | ||
| 63 | /> | ||
| 64 | <TextView | ||
| 65 | android:id="@+id/tv_3" | ||
| 66 | android:layout_width="wrap_content" | ||
| 67 | android:layout_height="wrap_content" | ||
| 68 | android:text="头像" | ||
| 69 | android:textColor="#333333" | ||
| 70 | android:textSize="15dp" | ||
| 71 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 72 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 73 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 74 | android:layout_marginLeft="15dp" | ||
| 75 | /> | ||
| 76 | <ImageView | ||
| 77 | android:layout_width="5.5dp" | ||
| 78 | android:layout_height="9.5dp" | ||
| 79 | android:background="@mipmap/ycaj" | ||
| 80 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 81 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 82 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 83 | android:layout_marginRight="15dp" | ||
| 84 | /> | ||
| 85 | |||
| 86 | <View | ||
| 87 | android:id="@+id/view_4" | ||
| 88 | android:layout_width="345dp" | ||
| 89 | android:layout_height="90dp" | ||
| 90 | android:background="@drawable/bg_solid_white_10" | ||
| 91 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 92 | app:layout_constraintRight_toRightOf="parent" | ||
| 93 | app:layout_constraintTop_toTopOf="parent" | ||
| 94 | android:layout_marginTop="185dp" | ||
| 95 | /> | ||
| 96 | |||
| 97 | <TextView | ||
| 98 | android:id="@+id/tv_4" | ||
| 99 | android:layout_width="wrap_content" | ||
| 100 | android:layout_height="wrap_content" | ||
| 101 | android:text="账户" | ||
| 102 | android:textColor="#333333" | ||
| 103 | android:textSize="15dp" | ||
| 104 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 105 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 106 | android:layout_marginLeft="15dp" | ||
| 107 | android:layout_marginTop="15dp" | ||
| 108 | /> | ||
| 109 | <TextView | ||
| 110 | android:id="@+id/tv_5" | ||
| 111 | android:layout_width="wrap_content" | ||
| 112 | android:layout_height="wrap_content" | ||
| 113 | android:text="密码" | ||
| 114 | android:textColor="#333333" | ||
| 115 | android:textSize="15dp" | ||
| 116 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 117 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 118 | android:layout_marginLeft="15dp" | ||
| 119 | android:layout_marginTop="60dp" | ||
| 120 | /> | ||
| 121 | <TextView | ||
| 122 | android:id="@+id/tv_6" | ||
| 123 | android:layout_width="wrap_content" | ||
| 124 | android:layout_height="wrap_content" | ||
| 125 | android:text="123" | ||
| 126 | android:textColor="#666666" | ||
| 127 | android:textSize="15dp" | ||
| 128 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 129 | app:layout_constraintRight_toRightOf="@id/view_4" | ||
| 130 | android:layout_marginRight="15dp" | ||
| 131 | android:layout_marginTop="15dp" | ||
| 132 | /> | ||
| 133 | <ImageView | ||
| 134 | android:layout_width="5.5dp" | ||
| 135 | android:layout_height="9.5dp" | ||
| 136 | android:background="@mipmap/ycaj" | ||
| 137 | app:layout_constraintTop_toTopOf="@id/tv_7" | ||
| 138 | app:layout_constraintBottom_toBottomOf="@id/tv_7" | ||
| 139 | app:layout_constraintRight_toRightOf="@id/view_4" | ||
| 140 | android:layout_marginRight="15dp" | ||
| 141 | /> | ||
| 142 | <TextView | ||
| 143 | android:id="@+id/tv_7" | ||
| 144 | android:layout_width="wrap_content" | ||
| 145 | android:layout_height="wrap_content" | ||
| 146 | android:text="已设置" | ||
| 147 | android:textColor="#666666" | ||
| 148 | android:textSize="15dp" | ||
| 149 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 150 | app:layout_constraintRight_toRightOf="@id/view_4" | ||
| 151 | android:layout_marginRight="31dp" | ||
| 152 | android:layout_marginTop="60dp" | ||
| 153 | /> | ||
| 154 | |||
| 155 | |||
| 156 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/activity_yin.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <TextView | ||
| 17 | android:layout_width="wrap_content" | ||
| 18 | android:layout_height="wrap_content" | ||
| 19 | android:text="隐私政策" | ||
| 20 | android:textColor="#333333" | ||
| 21 | android:textSize="18dp" | ||
| 22 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 23 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 24 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 25 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 26 | /> | ||
| 27 | <ImageView | ||
| 28 | android:id="@+id/iv_back" | ||
| 29 | android:layout_width="10dp" | ||
| 30 | android:layout_height="16dp" | ||
| 31 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 32 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 33 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 34 | android:layout_marginLeft="15dp" | ||
| 35 | android:background="@mipmap/icon_back" | ||
| 36 | /> | ||
| 37 | <View | ||
| 38 | android:layout_width="match_parent" | ||
| 39 | android:layout_height="1dp" | ||
| 40 | android:background="#EEEEEE" | ||
| 41 | app:layout_constraintTop_toBottomOf="@id/view_1" | ||
| 42 | /> | ||
| 43 | |||
| 44 | |||
| 45 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/fragment_home.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <View | ||
| 10 | android:id="@+id/view_1" | ||
| 11 | android:layout_width="match_parent" | ||
| 12 | android:layout_height="44dp" | ||
| 13 | app:layout_constraintTop_toTopOf="parent" | ||
| 14 | android:background="@android:color/white" | ||
| 15 | /> | ||
| 16 | <ImageView | ||
| 17 | android:id="@+id/iv_1" | ||
| 18 | android:layout_width="10dp" | ||
| 19 | android:layout_height="16dp" | ||
| 20 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 21 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 22 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 23 | android:layout_marginLeft="15dp" | ||
| 24 | android:background="@mipmap/icon_back" | ||
| 25 | /> | ||
| 26 | |||
| 27 | <ImageView | ||
| 28 | android:id="@+id/iv_2" | ||
| 29 | android:layout_width="31dp" | ||
| 30 | android:layout_height="31dp" | ||
| 31 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 32 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 33 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 34 | android:layout_marginLeft="35dp" | ||
| 35 | android:background="@mipmap/txz" | ||
| 36 | /> | ||
| 37 | <TextView | ||
| 38 | android:id="@+id/tv_name" | ||
| 39 | android:layout_width="wrap_content" | ||
| 40 | android:layout_height="wrap_content" | ||
| 41 | android:textColor="#333333" | ||
| 42 | android:textSize="15dp" | ||
| 43 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 44 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 45 | app:layout_constraintLeft_toRightOf="@id/iv_2" | ||
| 46 | android:layout_marginLeft="6.5dp" | ||
| 47 | /> | ||
| 48 | <ImageView | ||
| 49 | android:id="@+id/iv_3" | ||
| 50 | android:layout_width="8dp" | ||
| 51 | android:layout_height="5dp" | ||
| 52 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 53 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 54 | app:layout_constraintLeft_toRightOf="@id/tv_name" | ||
| 55 | android:layout_marginLeft="5dp" | ||
| 56 | android:background="@mipmap/xxan" | ||
| 57 | /> | ||
| 58 | |||
| 59 | <ImageView | ||
| 60 | android:id="@+id/iv_sapmiao" | ||
| 61 | android:layout_width="345dp" | ||
| 62 | android:layout_height="167dp" | ||
| 63 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 64 | app:layout_constraintRight_toRightOf="parent" | ||
| 65 | app:layout_constraintTop_toTopOf="parent" | ||
| 66 | android:layout_marginTop="60dp" | ||
| 67 | android:background="@mipmap/ssss" | ||
| 68 | /> | ||
| 69 | |||
| 70 | |||
| 71 | <View | ||
| 72 | android:id="@+id/view_2" | ||
| 73 | android:layout_width="345dp" | ||
| 74 | android:layout_height="100dp" | ||
| 75 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 76 | app:layout_constraintRight_toRightOf="parent" | ||
| 77 | app:layout_constraintTop_toTopOf="parent" | ||
| 78 | android:background="@drawable/bg_solid_white_10" | ||
| 79 | android:layout_marginTop="240dp" | ||
| 80 | /> | ||
| 81 | |||
| 82 | <ImageView | ||
| 83 | android:id="@+id/iv_21" | ||
| 84 | android:layout_width="50dp" | ||
| 85 | android:layout_height="50dp" | ||
| 86 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 87 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 88 | android:layout_marginLeft="10dp" | ||
| 89 | android:layout_marginTop="15dp" | ||
| 90 | android:background="@mipmap/yyxz" | ||
| 91 | /> | ||
| 92 | <TextView | ||
| 93 | android:layout_width="wrap_content" | ||
| 94 | android:layout_height="wrap_content" | ||
| 95 | android:textColor="#333333" | ||
| 96 | android:textSize="13dp" | ||
| 97 | android:text="应用管理" | ||
| 98 | android:layout_marginTop="8dp" | ||
| 99 | app:layout_constraintLeft_toLeftOf="@id/iv_21" | ||
| 100 | app:layout_constraintRight_toRightOf="@id/iv_21" | ||
| 101 | app:layout_constraintTop_toBottomOf="@id/iv_21" | ||
| 102 | /> | ||
| 103 | <ImageView | ||
| 104 | android:id="@+id/iv_22" | ||
| 105 | android:layout_width="50dp" | ||
| 106 | android:layout_height="50dp" | ||
| 107 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 108 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 109 | android:layout_marginLeft="101dp" | ||
| 110 | android:layout_marginTop="15dp" | ||
| 111 | android:background="@mipmap/xxxt" | ||
| 112 | /> | ||
| 113 | <TextView | ||
| 114 | android:layout_width="wrap_content" | ||
| 115 | android:layout_height="wrap_content" | ||
| 116 | android:textColor="#333333" | ||
| 117 | android:textSize="13dp" | ||
| 118 | android:text="小星错题" | ||
| 119 | android:layout_marginTop="8dp" | ||
| 120 | app:layout_constraintLeft_toLeftOf="@id/iv_22" | ||
| 121 | app:layout_constraintRight_toRightOf="@id/iv_22" | ||
| 122 | app:layout_constraintTop_toBottomOf="@id/iv_22" | ||
| 123 | /> | ||
| 124 | <ImageView | ||
| 125 | android:id="@+id/iv_23" | ||
| 126 | android:layout_width="50dp" | ||
| 127 | android:layout_height="50dp" | ||
| 128 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 129 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 130 | android:layout_marginLeft="194dp" | ||
| 131 | android:layout_marginTop="15dp" | ||
| 132 | android:background="@mipmap/ffsj" | ||
| 133 | /> | ||
| 134 | <TextView | ||
| 135 | android:layout_width="wrap_content" | ||
| 136 | android:layout_height="wrap_content" | ||
| 137 | android:textColor="#333333" | ||
| 138 | android:textSize="13dp" | ||
| 139 | android:text="分发试卷" | ||
| 140 | android:layout_marginTop="8dp" | ||
| 141 | app:layout_constraintLeft_toLeftOf="@id/iv_23" | ||
| 142 | app:layout_constraintRight_toRightOf="@id/iv_23" | ||
| 143 | app:layout_constraintTop_toBottomOf="@id/iv_23" | ||
| 144 | /> | ||
| 145 | <ImageView | ||
| 146 | android:id="@+id/iv_24" | ||
| 147 | android:layout_width="50dp" | ||
| 148 | android:layout_height="50dp" | ||
| 149 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 150 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 151 | android:layout_marginLeft="285dp" | ||
| 152 | android:layout_marginTop="15dp" | ||
| 153 | android:background="@mipmap/sbgl" | ||
| 154 | /> | ||
| 155 | <TextView | ||
| 156 | android:layout_width="wrap_content" | ||
| 157 | android:layout_height="wrap_content" | ||
| 158 | android:textColor="#333333" | ||
| 159 | android:textSize="13dp" | ||
| 160 | android:text="设备管理" | ||
| 161 | android:layout_marginTop="8dp" | ||
| 162 | app:layout_constraintLeft_toLeftOf="@id/iv_24" | ||
| 163 | app:layout_constraintRight_toRightOf="@id/iv_24" | ||
| 164 | app:layout_constraintTop_toBottomOf="@id/iv_24" | ||
| 165 | /> | ||
| 166 | |||
| 167 | <View | ||
| 168 | android:id="@+id/view_3" | ||
| 169 | android:layout_width="345dp" | ||
| 170 | android:layout_height="225dp" | ||
| 171 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 172 | app:layout_constraintRight_toRightOf="parent" | ||
| 173 | app:layout_constraintTop_toTopOf="parent" | ||
| 174 | android:background="@drawable/bg_solid_white_10" | ||
| 175 | android:layout_marginTop="357dp" | ||
| 176 | /> | ||
| 177 | <TextView | ||
| 178 | android:id="@+id/tv_31" | ||
| 179 | android:layout_width="wrap_content" | ||
| 180 | android:layout_height="wrap_content" | ||
| 181 | android:textColor="#333333" | ||
| 182 | android:textSize="15dp" | ||
| 183 | android:text="本周学习计划" | ||
| 184 | android:layout_marginTop="15dp" | ||
| 185 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 186 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 187 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 188 | /> | ||
| 189 | <View | ||
| 190 | android:layout_width="25dp" | ||
| 191 | android:layout_height="1dp" | ||
| 192 | android:background="#EEEEEE" | ||
| 193 | app:layout_constraintRight_toLeftOf="@+id/tv_31" | ||
| 194 | app:layout_constraintTop_toTopOf="@id/tv_31" | ||
| 195 | app:layout_constraintBottom_toBottomOf="@id/tv_31" | ||
| 196 | android:layout_marginRight="10dp" | ||
| 197 | /> | ||
| 198 | <View | ||
| 199 | android:layout_width="25dp" | ||
| 200 | android:layout_height="1dp" | ||
| 201 | android:background="#EEEEEE" | ||
| 202 | app:layout_constraintLeft_toRightOf="@+id/tv_31" | ||
| 203 | app:layout_constraintTop_toTopOf="@id/tv_31" | ||
| 204 | app:layout_constraintBottom_toBottomOf="@id/tv_31" | ||
| 205 | android:layout_marginLeft="10dp" | ||
| 206 | /> | ||
| 207 | <ImageView | ||
| 208 | android:layout_width="103dp" | ||
| 209 | android:layout_height="66dp" | ||
| 210 | android:background="@mipmap/zwjh" | ||
| 211 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 212 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 213 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 214 | android:layout_marginTop="77dp" | ||
| 215 | /> | ||
| 216 | <TextView | ||
| 217 | android:layout_width="wrap_content" | ||
| 218 | android:layout_height="wrap_content" | ||
| 219 | android:textColor="#666666" | ||
| 220 | android:textSize="12dp" | ||
| 221 | android:text="本周学习计划" | ||
| 222 | android:layout_marginTop="161dp" | ||
| 223 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 224 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 225 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 226 | /> | ||
| 227 | |||
| 228 | |||
| 229 | |||
| 230 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/layout/fragment_me.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:layout_width="match_parent" | ||
| 4 | android:layout_height="match_parent" | ||
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="#F4F6F8" | ||
| 7 | > | ||
| 8 | |||
| 9 | <androidx.constraintlayout.widget.Group | ||
| 10 | android:id="@+id/group_1" | ||
| 11 | android:layout_width="wrap_content" | ||
| 12 | android:layout_height="wrap_content" | ||
| 13 | app:constraint_referenced_ids="iv_toux,tv_name,tv_phone,view_2,tv_title,iv_21,iv_22,iv_23,tv_21,tv_22,tv_23" | ||
| 14 | android:visibility="gone" | ||
| 15 | /> | ||
| 16 | |||
| 17 | <View | ||
| 18 | android:id="@+id/view_1" | ||
| 19 | android:layout_width="match_parent" | ||
| 20 | android:layout_height="44dp" | ||
| 21 | app:layout_constraintTop_toTopOf="parent" | ||
| 22 | android:background="@android:color/white" | ||
| 23 | /> | ||
| 24 | <TextView | ||
| 25 | android:layout_width="wrap_content" | ||
| 26 | android:layout_height="wrap_content" | ||
| 27 | android:text="个人中心" | ||
| 28 | android:textColor="#333333" | ||
| 29 | android:textSize="18dp" | ||
| 30 | app:layout_constraintLeft_toLeftOf="@id/view_1" | ||
| 31 | app:layout_constraintRight_toRightOf="@id/view_1" | ||
| 32 | app:layout_constraintTop_toTopOf="@id/view_1" | ||
| 33 | app:layout_constraintBottom_toBottomOf="@id/view_1" | ||
| 34 | /> | ||
| 35 | |||
| 36 | <ImageView | ||
| 37 | android:id="@+id/iv_bann" | ||
| 38 | android:layout_width="345dp" | ||
| 39 | android:layout_height="167dp" | ||
| 40 | android:background="@mipmap/smdlaa" | ||
| 41 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 42 | app:layout_constraintRight_toRightOf="parent" | ||
| 43 | app:layout_constraintTop_toTopOf="parent" | ||
| 44 | android:layout_marginTop="63dp" | ||
| 45 | android:visibility="visible" | ||
| 46 | /> | ||
| 47 | |||
| 48 | <ImageView | ||
| 49 | android:id="@+id/iv_toux" | ||
| 50 | android:layout_width="57dp" | ||
| 51 | android:layout_height="57dp" | ||
| 52 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 53 | app:layout_constraintTop_toTopOf="parent" | ||
| 54 | android:layout_marginLeft="15dp" | ||
| 55 | android:layout_marginTop="63dp" | ||
| 56 | android:background="@mipmap/txz" | ||
| 57 | /> | ||
| 58 | |||
| 59 | <TextView | ||
| 60 | android:id="@+id/tv_name" | ||
| 61 | android:layout_width="wrap_content" | ||
| 62 | android:layout_height="wrap_content" | ||
| 63 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 64 | app:layout_constraintTop_toTopOf="parent" | ||
| 65 | android:layout_marginLeft="88dp" | ||
| 66 | android:layout_marginTop="72dp" | ||
| 67 | android:textSize="20dp" | ||
| 68 | android:textColor="#333333" | ||
| 69 | android:text="名字" | ||
| 70 | /> | ||
| 71 | <TextView | ||
| 72 | android:id="@+id/tv_phone" | ||
| 73 | android:layout_width="wrap_content" | ||
| 74 | android:layout_height="wrap_content" | ||
| 75 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 76 | app:layout_constraintTop_toTopOf="parent" | ||
| 77 | android:layout_marginLeft="88dp" | ||
| 78 | android:layout_marginTop="98dp" | ||
| 79 | android:textColor="#999999" | ||
| 80 | android:textSize="17dp" | ||
| 81 | android:text="1231223123" | ||
| 82 | /> | ||
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | <View | ||
| 87 | android:id="@+id/view_2" | ||
| 88 | android:layout_width="345dp" | ||
| 89 | android:layout_height="140dp" | ||
| 90 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 91 | app:layout_constraintRight_toRightOf="parent" | ||
| 92 | app:layout_constraintTop_toTopOf="parent" | ||
| 93 | android:layout_marginTop="140dp" | ||
| 94 | android:background="@drawable/bg_solid_white_10" | ||
| 95 | /> | ||
| 96 | |||
| 97 | <TextView | ||
| 98 | android:id="@+id/tv_title" | ||
| 99 | android:layout_width="wrap_content" | ||
| 100 | android:layout_height="wrap_content" | ||
| 101 | android:text="学生" | ||
| 102 | android:textColor="#333333" | ||
| 103 | android:textSize="16dp" | ||
| 104 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 105 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 106 | android:layout_marginLeft="15dp" | ||
| 107 | android:layout_marginTop="15dp" | ||
| 108 | /> | ||
| 109 | |||
| 110 | <ImageView | ||
| 111 | android:id="@+id/iv_21" | ||
| 112 | android:layout_width="56dp" | ||
| 113 | android:layout_height="56dp" | ||
| 114 | android:background="@mipmap/tjxss" | ||
| 115 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 116 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 117 | android:layout_marginLeft="15dp" | ||
| 118 | android:layout_marginTop="44dp" | ||
| 119 | /> | ||
| 120 | <TextView | ||
| 121 | android:id="@+id/tv_21" | ||
| 122 | android:layout_width="wrap_content" | ||
| 123 | android:layout_height="wrap_content" | ||
| 124 | app:layout_constraintLeft_toLeftOf="@id/iv_21" | ||
| 125 | app:layout_constraintRight_toRightOf="@id/iv_21" | ||
| 126 | app:layout_constraintTop_toBottomOf="@id/iv_21" | ||
| 127 | android:layout_marginTop="10dp" | ||
| 128 | android:textColor="#000000" | ||
| 129 | android:textSize="13dp" | ||
| 130 | android:text="添加学生" | ||
| 131 | /> | ||
| 132 | <ImageView | ||
| 133 | android:id="@+id/iv_22" | ||
| 134 | android:layout_width="56dp" | ||
| 135 | android:layout_height="56dp" | ||
| 136 | android:background="@mipmap/tjxss" | ||
| 137 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 138 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 139 | android:layout_marginLeft="144dp" | ||
| 140 | android:layout_marginTop="44dp" | ||
| 141 | /> | ||
| 142 | <TextView | ||
| 143 | android:id="@+id/tv_22" | ||
| 144 | android:layout_width="wrap_content" | ||
| 145 | android:layout_height="wrap_content" | ||
| 146 | app:layout_constraintLeft_toLeftOf="@id/iv_22" | ||
| 147 | app:layout_constraintRight_toRightOf="@id/iv_22" | ||
| 148 | app:layout_constraintTop_toBottomOf="@id/iv_22" | ||
| 149 | android:layout_marginTop="10dp" | ||
| 150 | android:textColor="#000000" | ||
| 151 | android:textSize="13dp" | ||
| 152 | android:text="添加学生" | ||
| 153 | /> | ||
| 154 | <ImageView | ||
| 155 | android:id="@+id/iv_23" | ||
| 156 | android:layout_width="56dp" | ||
| 157 | android:layout_height="56dp" | ||
| 158 | android:background="@mipmap/tjxss" | ||
| 159 | app:layout_constraintLeft_toLeftOf="@id/view_2" | ||
| 160 | app:layout_constraintTop_toTopOf="@id/view_2" | ||
| 161 | android:layout_marginLeft="274dp" | ||
| 162 | android:layout_marginTop="44dp" | ||
| 163 | /> | ||
| 164 | <TextView | ||
| 165 | android:id="@+id/tv_23" | ||
| 166 | android:layout_width="wrap_content" | ||
| 167 | android:layout_height="wrap_content" | ||
| 168 | app:layout_constraintLeft_toLeftOf="@id/iv_23" | ||
| 169 | app:layout_constraintRight_toRightOf="@id/iv_23" | ||
| 170 | app:layout_constraintTop_toBottomOf="@id/iv_23" | ||
| 171 | android:layout_marginTop="10dp" | ||
| 172 | android:textColor="#000000" | ||
| 173 | android:textSize="13dp" | ||
| 174 | android:text="添加学生" | ||
| 175 | /> | ||
| 176 | |||
| 177 | |||
| 178 | |||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | |||
| 183 | |||
| 184 | |||
| 185 | <View | ||
| 186 | android:id="@+id/view_3" | ||
| 187 | android:layout_width="345dp" | ||
| 188 | android:layout_height="45dp" | ||
| 189 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 190 | app:layout_constraintRight_toRightOf="parent" | ||
| 191 | app:layout_goneMarginTop="241dp" | ||
| 192 | app:layout_constraintTop_toBottomOf="@id/view_2" | ||
| 193 | android:layout_marginTop="15dp" | ||
| 194 | android:background="@drawable/bg_solid_white_10_top" | ||
| 195 | /> | ||
| 196 | <ImageView | ||
| 197 | android:layout_width="6.8dp" | ||
| 198 | android:layout_height="12dp" | ||
| 199 | android:background="@mipmap/ycaj" | ||
| 200 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 201 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 202 | app:layout_constraintRight_toRightOf="@id/view_3" | ||
| 203 | android:layout_marginRight="15dp" | ||
| 204 | /> | ||
| 205 | <ImageView | ||
| 206 | android:layout_width="14dp" | ||
| 207 | android:layout_height="14dp" | ||
| 208 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 209 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 210 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 211 | android:layout_marginLeft="15dp" | ||
| 212 | android:background="@mipmap/szz" | ||
| 213 | /> | ||
| 214 | |||
| 215 | <TextView | ||
| 216 | android:layout_width="wrap_content" | ||
| 217 | android:layout_height="wrap_content" | ||
| 218 | android:textColor="#333333" | ||
| 219 | android:textSize="15dp" | ||
| 220 | android:text="账户设置" | ||
| 221 | app:layout_constraintTop_toTopOf="@id/view_3" | ||
| 222 | app:layout_constraintBottom_toBottomOf="@id/view_3" | ||
| 223 | app:layout_constraintLeft_toLeftOf="@id/view_3" | ||
| 224 | android:layout_marginLeft="40dp" | ||
| 225 | /> | ||
| 226 | <View | ||
| 227 | android:id="@+id/view_4" | ||
| 228 | android:layout_width="345dp" | ||
| 229 | android:layout_height="45dp" | ||
| 230 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 231 | app:layout_constraintRight_toRightOf="parent" | ||
| 232 | app:layout_constraintTop_toBottomOf="@id/view_3" | ||
| 233 | android:background="@android:color/white" | ||
| 234 | /> | ||
| 235 | <ImageView | ||
| 236 | android:layout_width="6.8dp" | ||
| 237 | android:layout_height="12dp" | ||
| 238 | android:background="@mipmap/ycaj" | ||
| 239 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 240 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 241 | app:layout_constraintRight_toRightOf="@id/view_4" | ||
| 242 | android:layout_marginRight="15dp" | ||
| 243 | /> | ||
| 244 | <ImageView | ||
| 245 | android:layout_width="14dp" | ||
| 246 | android:layout_height="14dp" | ||
| 247 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 248 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 249 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 250 | android:layout_marginLeft="15dp" | ||
| 251 | android:background="@mipmap/yincs" | ||
| 252 | /> | ||
| 253 | |||
| 254 | <TextView | ||
| 255 | android:layout_width="wrap_content" | ||
| 256 | android:layout_height="wrap_content" | ||
| 257 | android:textColor="#333333" | ||
| 258 | android:textSize="15dp" | ||
| 259 | android:text="隐私设置" | ||
| 260 | app:layout_constraintTop_toTopOf="@id/view_4" | ||
| 261 | app:layout_constraintBottom_toBottomOf="@id/view_4" | ||
| 262 | app:layout_constraintLeft_toLeftOf="@id/view_4" | ||
| 263 | android:layout_marginLeft="40dp" | ||
| 264 | /> | ||
| 265 | |||
| 266 | <View | ||
| 267 | android:id="@+id/view_5" | ||
| 268 | android:layout_width="345dp" | ||
| 269 | android:layout_height="45dp" | ||
| 270 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 271 | app:layout_constraintRight_toRightOf="parent" | ||
| 272 | app:layout_constraintTop_toBottomOf="@id/view_4" | ||
| 273 | android:background="@android:color/white" | ||
| 274 | /> | ||
| 275 | <ImageView | ||
| 276 | android:layout_width="6.8dp" | ||
| 277 | android:layout_height="12dp" | ||
| 278 | android:background="@mipmap/ycaj" | ||
| 279 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 280 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 281 | app:layout_constraintRight_toRightOf="@id/view_5" | ||
| 282 | android:layout_marginRight="15dp" | ||
| 283 | /> | ||
| 284 | <ImageView | ||
| 285 | android:layout_width="14dp" | ||
| 286 | android:layout_height="14dp" | ||
| 287 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 288 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 289 | app:layout_constraintLeft_toLeftOf="@id/view_5" | ||
| 290 | android:layout_marginLeft="15dp" | ||
| 291 | android:background="@mipmap/gywmm" | ||
| 292 | /> | ||
| 293 | |||
| 294 | <TextView | ||
| 295 | android:layout_width="wrap_content" | ||
| 296 | android:layout_height="wrap_content" | ||
| 297 | android:textColor="#333333" | ||
| 298 | android:textSize="15dp" | ||
| 299 | android:text="关于我们" | ||
| 300 | app:layout_constraintTop_toTopOf="@id/view_5" | ||
| 301 | app:layout_constraintBottom_toBottomOf="@id/view_5" | ||
| 302 | app:layout_constraintLeft_toLeftOf="@id/view_5" | ||
| 303 | android:layout_marginLeft="40dp" | ||
| 304 | /> | ||
| 305 | <View | ||
| 306 | android:id="@+id/view_6" | ||
| 307 | android:layout_width="345dp" | ||
| 308 | android:layout_height="45dp" | ||
| 309 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 310 | app:layout_constraintRight_toRightOf="parent" | ||
| 311 | app:layout_constraintTop_toBottomOf="@id/view_5" | ||
| 312 | android:background="@drawable/bg_solid_white_10_bottom" | ||
| 313 | /> | ||
| 314 | |||
| 315 | <ImageView | ||
| 316 | android:layout_width="14dp" | ||
| 317 | android:layout_height="14dp" | ||
| 318 | app:layout_constraintTop_toTopOf="@id/view_6" | ||
| 319 | app:layout_constraintBottom_toBottomOf="@id/view_6" | ||
| 320 | app:layout_constraintLeft_toLeftOf="@id/view_6" | ||
| 321 | android:layout_marginLeft="15dp" | ||
| 322 | android:background="@mipmap/banb" | ||
| 323 | /> | ||
| 324 | |||
| 325 | <TextView | ||
| 326 | android:layout_width="wrap_content" | ||
| 327 | android:layout_height="wrap_content" | ||
| 328 | android:textColor="#333333" | ||
| 329 | android:textSize="15dp" | ||
| 330 | android:text="当前版本" | ||
| 331 | app:layout_constraintTop_toTopOf="@id/view_6" | ||
| 332 | app:layout_constraintBottom_toBottomOf="@id/view_6" | ||
| 333 | app:layout_constraintLeft_toLeftOf="@id/view_6" | ||
| 334 | android:layout_marginLeft="40dp" | ||
| 335 | /> | ||
| 336 | <TextView | ||
| 337 | android:layout_width="wrap_content" | ||
| 338 | android:layout_height="wrap_content" | ||
| 339 | android:textColor="#333333" | ||
| 340 | android:textSize="15dp" | ||
| 341 | android:text="V1.0" | ||
| 342 | app:layout_constraintTop_toTopOf="@id/view_6" | ||
| 343 | app:layout_constraintBottom_toBottomOf="@id/view_6" | ||
| 344 | app:layout_constraintRight_toRightOf="@id/view_6" | ||
| 345 | android:layout_marginRight="15dp" | ||
| 346 | /> | ||
| 347 | |||
| 348 | |||
| 349 | </androidx.constraintlayout.widget.ConstraintLayout> |
app/src/main/res/mipmap-hdpi/abcdss.jpg
20.6 KB
app/src/main/res/mipmap-hdpi/banb.png
573 Bytes
app/src/main/res/mipmap-hdpi/bg.png
45.2 KB
app/src/main/res/mipmap-hdpi/eco.png
15.1 KB
app/src/main/res/mipmap-hdpi/ffsj.png
4.54 KB
app/src/main/res/mipmap-hdpi/gx.png
847 Bytes
app/src/main/res/mipmap-hdpi/gywmm.png
492 Bytes
app/src/main/res/mipmap-hdpi/hoss.png
847 Bytes
app/src/main/res/mipmap-hdpi/hous.png
832 Bytes
app/src/main/res/mipmap-hdpi/icon.png
82.3 KB
app/src/main/res/mipmap-hdpi/icon_back.png
694 Bytes
app/src/main/res/mipmap-hdpi/icon_qd.png
105 KB
app/src/main/res/mipmap-hdpi/mm.png
959 Bytes
app/src/main/res/mipmap-hdpi/mrtx.png
3.72 KB
app/src/main/res/mipmap-hdpi/sbgl.png
5.19 KB
app/src/main/res/mipmap-hdpi/sc.png
732 Bytes
app/src/main/res/mipmap-hdpi/sjh.png
767 Bytes
app/src/main/res/mipmap-hdpi/smdlaa.png
145 KB
app/src/main/res/mipmap-hdpi/ssss.png
139 KB
app/src/main/res/mipmap-hdpi/szz.png
775 Bytes
app/src/main/res/mipmap-hdpi/tjxss.png
3.37 KB
app/src/main/res/mipmap-hdpi/txz.png
13.3 KB
app/src/main/res/mipmap-hdpi/wmss.png
1.2 KB
app/src/main/res/mipmap-hdpi/wmus.png
1.25 KB
app/src/main/res/mipmap-hdpi/wsyq.png
563 Bytes
app/src/main/res/mipmap-hdpi/xb_n.png
796 Bytes
app/src/main/res/mipmap-hdpi/xb_nv.png
799 Bytes
app/src/main/res/mipmap-hdpi/xs.png
1.5 KB
app/src/main/res/mipmap-hdpi/xxan.png
348 Bytes
app/src/main/res/mipmap-hdpi/xxxt.png
5.01 KB
app/src/main/res/mipmap-hdpi/yc.png
1.53 KB
app/src/main/res/mipmap-hdpi/ycaj.png
362 Bytes
app/src/main/res/mipmap-hdpi/yincs.png
700 Bytes
app/src/main/res/mipmap-hdpi/yyxz.png
4.26 KB
app/src/main/res/mipmap-hdpi/zwjh.png
10.9 KB
app/src/main/res/mipmap-mdpi/icon.png
34.9 KB
app/src/main/res/mipmap-xhdpi/icon.png
136 KB
app/src/main/res/mipmap-xxhdpi/icon.png
354 KB