diff --git a/.gradle/7.2/executionHistory/executionHistory.bin b/.gradle/7.2/executionHistory/executionHistory.bin index 7a1a746..a97c33b 100644 Binary files a/.gradle/7.2/executionHistory/executionHistory.bin and b/.gradle/7.2/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.2/executionHistory/executionHistory.lock b/.gradle/7.2/executionHistory/executionHistory.lock index a141ba7..5ab627c 100644 Binary files a/.gradle/7.2/executionHistory/executionHistory.lock and b/.gradle/7.2/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.2/fileHashes/fileHashes.bin b/.gradle/7.2/fileHashes/fileHashes.bin index 7007988..4efe282 100644 Binary files a/.gradle/7.2/fileHashes/fileHashes.bin and b/.gradle/7.2/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.2/fileHashes/fileHashes.lock b/.gradle/7.2/fileHashes/fileHashes.lock index b0f08ce..f7a5660 100644 Binary files a/.gradle/7.2/fileHashes/fileHashes.lock and b/.gradle/7.2/fileHashes/fileHashes.lock differ diff --git a/.gradle/7.2/fileHashes/resourceHashesCache.bin b/.gradle/7.2/fileHashes/resourceHashesCache.bin index 26f048a..9543f71 100644 Binary files a/.gradle/7.2/fileHashes/resourceHashesCache.bin and b/.gradle/7.2/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 181920b..c132f7c 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index 1cf41a2..06dc650 100644 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/app/src/main/java/com/coldmint/rust/pro/RegisterActivity.kt b/app/src/main/java/com/coldmint/rust/pro/RegisterActivity.kt index fc0f47d..6db260b 100644 --- a/app/src/main/java/com/coldmint/rust/pro/RegisterActivity.kt +++ b/app/src/main/java/com/coldmint/rust/pro/RegisterActivity.kt @@ -2,6 +2,7 @@ package com.coldmint.rust.pro import android.os.Bundle import android.text.Editable +import android.text.InputType import android.text.TextWatcher import com.coldmint.rust.pro.base.BaseActivity import android.view.View @@ -10,6 +11,7 @@ import com.coldmint.rust.pro.tool.GlobalMethod import com.coldmint.rust.core.interfaces.ApiCallBack import com.coldmint.rust.core.web.ServerConfiguration import com.afollestad.materialdialogs.MaterialDialog +import com.afollestad.materialdialogs.input.input import com.coldmint.rust.core.dataBean.ApiResponse import com.coldmint.rust.core.dataBean.RegisterRequestData import com.coldmint.rust.core.web.User @@ -84,6 +86,36 @@ class RegisterActivity : BaseActivity() { }) + viewBinding.mailHelpTextView.setOnClickListener { + //预填充qq号 + val tail = "@qq.com" + val oldEmailValue = viewBinding.emailView.text.toString() + val hasOldQQ = oldEmailValue.endsWith(tail) + var oldQQ = "" + if (hasOldQQ) { + oldQQ = oldEmailValue.subSequence(0, oldEmailValue.length - tail.length).toString() + } + //显示对话框 + MaterialDialog(this).show { + title(R.string.email).message(R.string.mail_helper_tip) + .input( + hintRes = R.string.qq_number, + maxLength = viewBinding.emailInputLayout.counterMaxLength - tail.length, + inputType = InputType.TYPE_CLASS_NUMBER, + prefill = oldQQ + ) { materialDialog, charSequence -> + val email = "${charSequence}${tail}" + viewBinding.emailView.setText(email) + Snackbar.make( + viewBinding.registerButton, + R.string.email_fill_complete, + Snackbar.LENGTH_SHORT + ).show() + } + .positiveButton(R.string.dialog_ok).negativeButton(R.string.dialog_close) + } + + } viewBinding.registerButton.setOnClickListener(View.OnClickListener { v -> diff --git a/app/src/main/res/layout/activity_register.xml b/app/src/main/res/layout/activity_register.xml index 732eeec..5c92571 100644 --- a/app/src/main/res/layout/activity_register.xml +++ b/app/src/main/res/layout/activity_register.xml @@ -120,12 +120,21 @@ android:maxLength="30" android:maxLines="1" /> + +