From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期三, 22 六月 2022 11:22:18 +0800 Subject: [PATCH] 修改引用路径 --- ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs index 2e36d6f..ea66313 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs @@ -74,21 +74,35 @@ txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uYouSuggestionMsg); frameInput.AddChidren(txtInput); txtInput.InitIosPlaceholderUILabelWithHeight(Application.GetRealHeight(60)); - txtInput.TextChangeEventHandler += (sender, txtvalue) => + //杈撳叆鍊兼敼鍙樹簨浠� + Action<View, string> txtInputChangedEvent = (sender, txtValue) => { if (this.suggestionCount <= 0) { return; } - int length = txtvalue.Length; + var newValue = txtValue; + //濡傛灉杈撳叆鐨勫��,宸茬粡澶т簬鎸囧畾鐨勬暟,鍒欐埅鍙� + if (newValue.Length > 500) + { + //鎴彇鎸囧畾鐨刡yte瀛楄妭 + newValue = newValue.Substring(0, 500); + txtInput.Text = newValue; + //灏嗗厜鏍囪嚦浜庢渶鍚� +#if Android + txtInput.SetSelectionEnd(); +#endif + } + + int length = newValue.Length; if (length == 0) { if (btnSubmit.CanClick == true) { btnSubmit.CanClick = false; } } else { - if (btnSubmit.CanClick == false) + if (btnSubmit.CanClick == false) { //鍙樼伆鑹插瓧浣� btnFild.TextColor = UserCenterColor.Current.TextGrayColor1; @@ -96,17 +110,8 @@ } } btnFild.Text = (500 - length).ToString(); - - if (length > 500) - { - if (btnSubmit.CanClick == true) - { - btnSubmit.CanClick = false; - //鍙樼孩鑹插瓧浣� - btnFild.TextColor = Common.ZigbeeColor.Current.GXCTextRed; - } - } }; + txtInput.TextChangeEventHandler += txtInputChangedEvent; var framType = new FrameLayout(); framType.Height = Application.GetRealHeight(150); -- Gitblit v1.8.0