From 0bf9e65bc3ba98391e7835c922b15baab3c77876 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 01 六月 2020 14:59:39 +0800
Subject: [PATCH] 上传一个合并的版本

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs |   54 +++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 47 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
index 84f54ab..0063924 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
@@ -20,7 +20,7 @@
         /// </summary>
         private FrameLayout m_frameTable = null;
         /// <summary>
-        /// 妗屽竷鎺т欢
+        /// 妗屽竷鎺т欢(杩欎釜涓滆タ涓嶈兘鍒狅紝鍥犱负鏈変簺鐣岄潰闇�瑕佷粬鐨勬甯�)
         /// </summary>
         public FrameLayout frameTable
         {
@@ -30,6 +30,11 @@
                 return m_frameTable;
             }
         }
+
+        /// <summary>
+        /// 涓�涓复鏃剁殑涓滆タ
+        /// </summary>
+        private FrameLayout frameBackTemp = null;
 
         #endregion
 
@@ -79,10 +84,11 @@
             //鍒濆鍖栨甯冩帶浠�
             this.InitFrameTable();
 
-            var child = this.m_frameTable.GetChildren(this.m_frameTable.ChildrenCount - 1);
-            if (child != null)
+            //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣
+            int value = this.GetLocationMostLastViewBottom(this.m_frameTable);
+            if (value != -1)
             {
-                frame.Y = child.Bottom + rowSpace;
+                frame.Y = value + rowSpace;
             }
             this.m_frameTable.AddChidren(frame);
             //璋冩暣妗屽竷楂樺害
@@ -97,7 +103,7 @@
         #region 鈻� 涓�鑸柟娉昣__________________________
 
         /// <summary>
-        /// 璋冩暣瀛怓rameLayout鐨勯珮搴�
+        /// 璋冩暣瀛怓rameLayout鐨勯珮搴�(鍙墿澶�,涓嶇缉灏�)
         /// </summary>
         /// <param name="frame"></param>
         /// <param name="buttomSpace">搴曢儴绌虹櫧闂磋窛(鐪熷疄鍊�)</param>
@@ -116,10 +122,31 @@
         }
 
         /// <summary>
+        /// 璋冩暣瀛怓rameLayout鐨勭湡瀹為珮搴�
+        /// </summary>
+        /// <param name="frame"></param>
+        public void AdjustChidrenFrameRealHeight(FrameLayout frame)
+        {
+            //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣
+            int value = this.GetLocationMostLastViewBottom(frame);
+            if (value != -1)
+            {
+                //璋冩暣妗屽竷楂樺害
+                frame.Height = value;
+            }
+        }
+
+        /// <summary>
         /// 璋冩暣妗屽竷楂樺害
         /// </summary>
         public void AdjustTableHeight()
         {
+            //2020.05.25杩藉姞
+            if (this.frameBackTemp != null && this.frameBackTemp.Parent != null)
+            {
+                this.frameBackTemp.RemoveFromParent();
+            }
+
             //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣
             int value = this.GetLocationMostLastViewBottom(this.m_frameTable);
             if (value != -1)
@@ -127,14 +154,25 @@
                 //璋冩暣妗屽竷楂樺害
                 this.m_frameTable.Height = value;
             }
+            else
+            {
+                //杩樺師涓哄師鏉ョ殑楂樺害
+                this.RecoverTableHeight();
+            }
         }
 
         /// <summary>
         /// 閽堝搴曢儴鐐瑰嚮鎸夐挳,璋冩暣鎺т欢鐪熷疄楂樺害
         /// </summary>
-        /// <param name="correctionsValue">Y杞磋ˉ姝e��(鐪熷疄鍊�,鍒楄〃鎺т欢涓嶅湪bodyFramelayout鐨勬椂鍊欎娇鐢�)</param>
+        /// <param name="correctionsValue">
+        /// <para>Y杞磋ˉ姝e��(鐪熷疄鍊�,鍒楄〃鎺т欢涓嶅湪bodyFramelayout鐨勬椂鍊欎娇鐢�)</para>
+        /// <para>涓�鑸负姝f暟,濡傛灉涓鸿礋鏁颁唬琛╞odyFramelayout瓒呭嚭浜嗛《閮�</para>
+        /// </param>
         public void AdjustRealHeightByBottomButton(int correctionsValue = 0)
         {
+            //璋冩暣妗屽竷楂樺害 2020.05.25杩藉姞
+            this.AdjustTableHeight();
+
             var btnTemp = new BottomClickButton();
             if (btnTemp.Yaxis >= this.m_frameTable.Height + correctionsValue)
             {
@@ -144,9 +182,11 @@
             //娣诲姞涓存椂鎺т欢,鐩磋嚦鍙互婊戝姩瓒呰繃搴曢儴鎸夐挳
             int oldRowSpace = this.rowSpace;
             this.rowSpace = 0;
-            var frameBackTemp = new FrameLayout();
+
+            this.frameBackTemp = new FrameLayout();
             frameBackTemp.Height = ControlCommonResourse.BodyFrameHeight - btnTemp.Yaxis + Application.GetRealHeight(23);
             this.AddChidrenFrame(frameBackTemp);
+
             this.rowSpace = oldRowSpace;
         }
 

--
Gitblit v1.8.0