浏览代码

Merge branches 'master_signhere' and 'master' of git.kdan.cc:wayne.huang/KdanLoginRegisterUI into master_signhere

# Conflicts:
#	src/main/java/com/kdanmobile/kdanloginregisterui/LoginBView.kt
luozhipeng 5 年之前
父节点
当前提交
d8cd1eccd1

+ 2 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/LoginBView.kt

@@ -53,6 +53,7 @@ class LoginBView @JvmOverloads constructor(
 
     private fun setupEmailLoginBtn() {
         view_loginB_emailLogin.setOnClickListener {
+            view_loginB_emailLogin.isEnabled = false
             val dialog = AlertDialog.Builder(context)
                 .setView(view)
                 .setOnDismissListener {
@@ -62,6 +63,7 @@ class LoginBView @JvmOverloads constructor(
                         inputMethodManager.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0)
                     }
                     (view.parent as ViewGroup).removeAllViews()
+                    view_loginB_emailLogin.isEnabled = true
                     post {
                         requestFocus()
                         inputMethodManager.hideSoftInputFromWindow(windowToken, 0)

+ 2 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/RegisterBView.kt

@@ -36,10 +36,12 @@ class RegisterBView @JvmOverloads constructor(
 
     private fun setupEmailRegisterBtn() {
         view_registerB_emailRegister.setOnClickListener {
+            view_registerB_emailRegister.isEnabled = false
             val dialog = AlertDialog.Builder(context)
                     .setView(view)
                     .setOnDismissListener {
                         (view.parent as ViewGroup).removeAllViews()
+                        view_registerB_emailRegister.isEnabled = true
                     }
                     .show()
             formView.let {