| | |
| | | /// </summary>
|
| | | private FrameLayout m_frameTable = null;
|
| | | /// <summary>
|
| | | /// 桌布控件
|
| | | /// 桌布控件(这个东西不能删,因为有些界面需要他的桌布)
|
| | | /// </summary>
|
| | | public FrameLayout frameTable
|
| | | {
|
| | |
| | | return m_frameTable;
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 一个临时的东西
|
| | | /// </summary>
|
| | | private FrameLayout frameBackTemp = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | //初始化桌布控件
|
| | | 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);
|
| | | //调整桌布高度
|
| | |
| | | #region ■ 一般方法___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 调整子FrameLayout的高度
|
| | | /// 调整子FrameLayout的高度(只扩大,不缩小)
|
| | | /// </summary>
|
| | | /// <param name="frame"></param>
|
| | | /// <param name="buttomSpace">底部空白间距(真实值)</param>
|
| | |
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 调整子FrameLayout的真实高度
|
| | | /// </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)
|
| | |
| | | //调整桌布高度
|
| | | this.m_frameTable.Height = value;
|
| | | }
|
| | | else
|
| | | {
|
| | | //还原为原来的高度
|
| | | this.RecoverTableHeight();
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 针对底部点击按钮,调整控件真实高度
|
| | | /// </summary>
|
| | | /// <param name="correctionsValue">Y轴补正值(真实值,列表控件不在bodyFramelayout的时候使用)</param>
|
| | | /// <param name="correctionsValue">
|
| | | /// <para>Y轴补正值(真实值,列表控件不在bodyFramelayout的时候使用)</para>
|
| | | /// <para>一般为正数,如果为负数代表bodyFramelayout超出了顶部</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)
|
| | | {
|
| | |
| | | //添加临时控件,直至可以滑动超过底部按钮
|
| | | 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;
|
| | | }
|
| | |
|