From c7df85937f73fb347ee0b19e9c052d2d00a6df6c Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 18 九月 2020 13:58:19 +0800
Subject: [PATCH] 新版本

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
index da2a3c0..1ee238d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
@@ -7,7 +7,7 @@
     /// <summary>
     /// 楠岃瘉鐮佹帶浠�
     /// </summary>
-    public class VerificationCodeControl : FrameLayout
+    public class VerificationCodeControl : NormalFrameLayout
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
@@ -131,6 +131,9 @@
                 //    }
                 //}
                 txtCode.Parent.BorderColor = UserCenterColor.Current.TextFrameSelectColor;
+#if Android
+                txtCode.SetSelectionEnd(); 
+#endif
             }
             else
             {
@@ -155,6 +158,10 @@
             if (textValue.Length == this.CodeLenth)
             {
                 dicCodeControls[this.CodeLenth - 1].Foucs = true;
+#if Android
+                //鍏夋爣鑷充簬鏈�鍚�
+                dicCodeControls[this.CodeLenth - 1].SetSelectionEnd();
+#endif
                 for (int i = 0; i < this.CodeLenth; i++)
                 {
                     //鍏堢Щ闄や簨浠�
@@ -183,9 +190,17 @@
                 if (dicCodeControls.ContainsKey(index + 1) == true)
                 {
                     dicCodeControls[index + 1].Foucs = true;
+#if Android
+                    //鍏夋爣鑷充簬鏈�鍚�
+                    dicCodeControls[index + 1].SetSelectionEnd();
+#endif
                 }
                 else
                 {
+#if Android
+                    //鍏夋爣鑷充簬鏈�鍚�
+                    txtCode.SetSelectionEnd();
+#endif
                     //鏈�鍚庝竴浣嶈緭鍏ュ畬鎴�,鏍¢獙楠岃瘉鐮�
                     string code = string.Empty;
                     for (int i = 0; i < this.CodeLenth; i++)
@@ -212,6 +227,10 @@
                     if (dicCodeControls.ContainsKey(index - 1) == true)
                     {
                         dicCodeControls[index - 1].Foucs = true;
+#if Android
+                        //鍏夋爣鑷充簬鏈�鍚�
+                        dicCodeControls[index - 1].SetSelectionEnd();
+#endif
                     }
                 }
             }
@@ -232,6 +251,22 @@
             }
         }
 
+        /// <summary>
+        /// 娓呯┖杈撳叆鐨勫��
+        /// </summary>
+        public void ClearInputValue()
+        {
+            foreach (var inputText in this.dicCodeControls.Values)
+            {
+                //鍏堢Щ闄や簨浠�
+                inputText.TextChangeEventHandler -= TxtCode_TextChangeEvent;
+                //璧嬪��
+                inputText.Text = string.Empty;
+                inputText.TextChangeEventHandler += TxtCode_TextChangeEvent;
+            }
+            dicCodeControls[0].Foucs = true;
+        }
+
         #endregion
 
         #region 鈻� 鎺т欢鎽ф瘉___________________________

--
Gitblit v1.8.0