From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 28 二月 2020 15:25:13 +0800 Subject: [PATCH] 2020.2.28 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs | 60 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 45 insertions(+), 15 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs index 0c90fa4..7f39997 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs @@ -18,7 +18,18 @@ /// <summary> /// 妗屽竷鎺т欢 /// </summary> - private FrameLayout frameTable = null; + private FrameLayout m_frameTable = null; + /// <summary> + /// 妗屽竷鎺т欢 + /// </summary> + public FrameLayout frameTable + { + get + { + if (m_frameTable == null) { this.InitFrameTable(); } + return m_frameTable; + } + } #endregion @@ -38,14 +49,14 @@ /// </summary> private void InitFrameTable() { - if (this.frameTable != null) + if (this.m_frameTable != null && this.m_frameTable.Parent != null) { return; } - this.frameTable = new FrameLayout(); - this.frameTable.Width = this.Width; - this.frameTable.Height = this.Height; - this.AddChidren(this.frameTable); + this.m_frameTable = new FrameLayout(); + this.m_frameTable.Width = this.Width; + this.m_frameTable.Height = this.Height; + this.AddChidren(this.m_frameTable); } #endregion @@ -61,16 +72,16 @@ //鍒濆鍖栨甯冩帶浠� this.InitFrameTable(); - var child = this.frameTable.GetChildren(this.frameTable.ChildrenCount - 1); + var child = this.m_frameTable.GetChildren(this.m_frameTable.ChildrenCount - 1); if (child != null) { frame.Y = child.Bottom + rowSpace; } - this.frameTable.AddChidren(frame); + this.m_frameTable.AddChidren(frame); //璋冩暣妗屽竷楂樺害 - if (this.frameTable.Height < frame.Bottom) + if (this.m_frameTable.Height < frame.Bottom) { - this.frameTable.Height = frame.Bottom; + this.m_frameTable.Height = frame.Bottom; } } @@ -101,17 +112,36 @@ /// </summary> public void AdjustTableHeight() { - var child = this.frameTable?.GetChildren(this.frameTable.ChildrenCount - 1); + var child = this.m_frameTable?.GetChildren(this.m_frameTable.ChildrenCount - 1); if (child != null) { //璋冩暣妗屽竷楂樺害 - if (this.frameTable.Height < child.Bottom) - { - this.frameTable.Height = child.Bottom; - } + this.m_frameTable.Height = child.Bottom; + //if (this.m_frameTable.Height < child.Bottom) + //{ + // this.m_frameTable.Height = child.Bottom; + //} } } + /// <summary> + /// 閽堝搴曢儴鐐瑰嚮鎸夐挳,璋冩暣鎺т欢鐪熷疄楂樺害 + /// </summary> + /// <param name="correctionsValue">Y杞磋ˉ姝e��(鐪熷疄鍊�,鍒楄〃鎺т欢涓嶅湪bodyFramelayout鐨勬椂鍊欎娇鐢�)</param> + public void AdjustRealHeightByBottomButton(int correctionsValue = 0) + { + var btnTemp = new BottomClickButton(); + if (btnTemp.Yaxis >= this.m_frameTable.Height + correctionsValue) + { + //娌℃湁瓒呰繃 + return; + } + //娣诲姞涓存椂鎺т欢,鐩磋嚦鍙互婊戝姩瓒呰繃搴曢儴鎸夐挳 + var frameBackTemp = new FrameLayout(); + frameBackTemp.Height = ControlCommonResourse.BodyFrameHeight - btnTemp.Yaxis + Application.GetRealHeight(23); + this.AddChidrenFrame(frameBackTemp); + } + #endregion } } -- Gitblit v1.8.0