Selaa lähdekoodia

1.隐藏区域码按钮,需点击才会出现。

0423x6e6f
wangwanlei 3 viikkoa sitten
vanhempi
commit
867cee28d7

+ 9
- 1
app/src/main/java/com/xhly/manageapp/ui/login/activity/LoginActivity.kt Näytä tiedosto

@@ -15,7 +15,6 @@ import androidx.activity.addCallback
15 15
 import androidx.lifecycle.lifecycleScope
16 16
 import androidx.work.PeriodicWorkRequest
17 17
 import androidx.work.WorkManager
18
-import com.kongzue.dialogx.DialogX
19 18
 import com.kongzue.dialogx.dialogs.CustomDialog
20 19
 import com.kongzue.dialogx.dialogs.WaitDialog
21 20
 import com.kongzue.dialogx.interfaces.OnBindView
@@ -53,6 +52,8 @@ class LoginActivity : BaseActivity<LoginViewModel, ActivityLoginBinding>() {
53 52
     private var regioncode = ""
54 53
     //如果次数大于10则可以打开设置页面
55 54
     private var showSettingNum=0
55
+    //如果次数大于10则可以打开区域码设置页面
56
+    private var showCodeNum=0
56 57
     private var waitDialog:WaitDialog?=null
57 58
     private var tipsDialog:CustomDialog?=null
58 59
     private var syncTimeClickFlag=false
@@ -148,6 +149,13 @@ class LoginActivity : BaseActivity<LoginViewModel, ActivityLoginBinding>() {
148 149
                 viewModel.postPwdDetail(code,it)
149 150
             }
150 151
         }
152
+        mBinding.ivShowcode.setOnClickListener {
153
+             showCodeNum++
154
+            if (showCodeNum>10){
155
+                showCodeNum=0
156
+                mBinding.codeLoginIv.visibility=View.VISIBLE
157
+            }
158
+        }
151 159
 
152 160
         mBinding.loginClayout.setOnClickListener {
153 161
             hiddenSoft(mBinding.accountEt)

+ 10
- 1
app/src/main/res/layout/activity_login.xml Näytä tiedosto

@@ -25,9 +25,9 @@
25 25
             android:layout_marginTop="42dp"
26 26
             android:layout_marginRight="28dp"
27 27
             android:src="@drawable/icon_setting"
28
+            android:visibility="invisible"
28 29
             app:layout_constraintRight_toRightOf="parent"
29 30
             app:layout_constraintTop_toTopOf="parent" />
30
-
31 31
         <androidx.core.widget.NestedScrollView
32 32
             android:id="@+id/login_sv"
33 33
             android:layout_width="match_parent"
@@ -61,6 +61,15 @@
61 61
                     app:layout_constraintRight_toRightOf="parent"
62 62
                     app:layout_constraintTop_toTopOf="@id/logo_iv" />
63 63
 
64
+                <ImageView
65
+                    android:id="@+id/iv_showcode"
66
+                    android:layout_width="40dp"
67
+                    android:layout_height="40dp"
68
+                    app:layout_constraintTop_toTopOf="@id/logo_tv"
69
+                    app:layout_constraintBottom_toBottomOf="@id/logo_tv"
70
+                    app:layout_constraintRight_toRightOf="parent"
71
+                    />
72
+
64 73
                 <ImageView
65 74
                     android:layout_width="22dp"
66 75
                     android:layout_height="22dp"

Loading…
Peruuta
Tallenna