Browse Source

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

0423x6e6f
wangwanlei 3 weeks ago
parent
commit
867cee28d7

+ 9
- 1
app/src/main/java/com/xhly/manageapp/ui/login/activity/LoginActivity.kt View File

15
 import androidx.lifecycle.lifecycleScope
15
 import androidx.lifecycle.lifecycleScope
16
 import androidx.work.PeriodicWorkRequest
16
 import androidx.work.PeriodicWorkRequest
17
 import androidx.work.WorkManager
17
 import androidx.work.WorkManager
18
-import com.kongzue.dialogx.DialogX
19
 import com.kongzue.dialogx.dialogs.CustomDialog
18
 import com.kongzue.dialogx.dialogs.CustomDialog
20
 import com.kongzue.dialogx.dialogs.WaitDialog
19
 import com.kongzue.dialogx.dialogs.WaitDialog
21
 import com.kongzue.dialogx.interfaces.OnBindView
20
 import com.kongzue.dialogx.interfaces.OnBindView
53
     private var regioncode = ""
52
     private var regioncode = ""
54
     //如果次数大于10则可以打开设置页面
53
     //如果次数大于10则可以打开设置页面
55
     private var showSettingNum=0
54
     private var showSettingNum=0
55
+    //如果次数大于10则可以打开区域码设置页面
56
+    private var showCodeNum=0
56
     private var waitDialog:WaitDialog?=null
57
     private var waitDialog:WaitDialog?=null
57
     private var tipsDialog:CustomDialog?=null
58
     private var tipsDialog:CustomDialog?=null
58
     private var syncTimeClickFlag=false
59
     private var syncTimeClickFlag=false
148
                 viewModel.postPwdDetail(code,it)
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
         mBinding.loginClayout.setOnClickListener {
160
         mBinding.loginClayout.setOnClickListener {
153
             hiddenSoft(mBinding.accountEt)
161
             hiddenSoft(mBinding.accountEt)

+ 10
- 1
app/src/main/res/layout/activity_login.xml View File

25
             android:layout_marginTop="42dp"
25
             android:layout_marginTop="42dp"
26
             android:layout_marginRight="28dp"
26
             android:layout_marginRight="28dp"
27
             android:src="@drawable/icon_setting"
27
             android:src="@drawable/icon_setting"
28
+            android:visibility="invisible"
28
             app:layout_constraintRight_toRightOf="parent"
29
             app:layout_constraintRight_toRightOf="parent"
29
             app:layout_constraintTop_toTopOf="parent" />
30
             app:layout_constraintTop_toTopOf="parent" />
30
-
31
         <androidx.core.widget.NestedScrollView
31
         <androidx.core.widget.NestedScrollView
32
             android:id="@+id/login_sv"
32
             android:id="@+id/login_sv"
33
             android:layout_width="match_parent"
33
             android:layout_width="match_parent"
61
                     app:layout_constraintRight_toRightOf="parent"
61
                     app:layout_constraintRight_toRightOf="parent"
62
                     app:layout_constraintTop_toTopOf="@id/logo_iv" />
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
                 <ImageView
73
                 <ImageView
65
                     android:layout_width="22dp"
74
                     android:layout_width="22dp"
66
                     android:layout_height="22dp"
75
                     android:layout_height="22dp"

Loading…
Cancel
Save