Prechádzať zdrojové kódy

Merge branch 'fixLoginRegisterBView'

cooperku_kdanmobile 5 rokov pred
rodič
commit
f1ce20a2ca

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

@@ -40,6 +40,7 @@ class LoginBView @JvmOverloads constructor(
 
 
     private fun setupEmailLoginBtn() {
     private fun setupEmailLoginBtn() {
         view_loginB_emailLogin.setOnClickListener {
         view_loginB_emailLogin.setOnClickListener {
+            view_loginB_emailLogin.isEnabled = false
             val dialog = AlertDialog.Builder(context)
             val dialog = AlertDialog.Builder(context)
                     .setView(view)
                     .setView(view)
                     .setOnDismissListener {
                     .setOnDismissListener {
@@ -52,6 +53,7 @@ class LoginBView @JvmOverloads constructor(
                             requestFocus()
                             requestFocus()
                             inputMethodManager.hideSoftInputFromWindow(windowToken, 0)
                             inputMethodManager.hideSoftInputFromWindow(windowToken, 0)
                         }
                         }
+                        view_loginB_emailLogin.isEnabled = true
                     }
                     }
                     .show()
                     .show()
 
 

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

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