| | |
| | | /// <summary>
|
| | | /// 桌布控件
|
| | | /// </summary>
|
| | | private FrameLayout m_frameTable = null;
|
| | | private NormalFrameLayout m_frameTable = null;
|
| | | /// <summary>
|
| | | /// 桌布控件(这个东西不能删,因为有些界面需要他的桌布)
|
| | | /// </summary>
|
| | | public FrameLayout frameTable
|
| | | public NormalFrameLayout frameTable
|
| | | {
|
| | | get
|
| | | {
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | this.m_frameTable = new FrameLayout();
|
| | | this.m_frameTable = new NormalFrameLayout();
|
| | | this.m_frameTable.Width = this.Width;
|
| | | this.m_frameTable.Height = this.Height;
|
| | | this.AddChidren(this.m_frameTable);
|
| | | base.AddChidren(this.m_frameTable);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | #region ■ 添加子控件_________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加Frame子控件
|
| | | /// 添加Frame子控件(注意,它是往下加控件,只会改变坐标,桌布大小会增加)
|
| | | /// </summary>
|
| | | /// <param name="view"></param>
|
| | | public void AddChidrenFrame(FrameLayout frame)
|
| | | public override void AddChidren(View view)
|
| | | {
|
| | | //初始化桌布控件
|
| | | this.InitFrameTable();
|
| | |
|
| | | //获取坐标底部最下面的那个控件的底部坐标
|
| | | int value = this.GetLocationMostLastViewBottom(this.m_frameTable);
|
| | | int value = this.GetLocationMostLastViewBottom(this.frameTable);
|
| | | if (value != -1)
|
| | | {
|
| | | frame.Y = value + rowSpace;
|
| | | view.Y = value + rowSpace;
|
| | | }
|
| | | this.m_frameTable.AddChidren(frame);
|
| | | this.frameTable.AddChidren(view);
|
| | | //调整桌布高度
|
| | | if (this.m_frameTable.Height < frame.Bottom)
|
| | | if (this.frameTable.Height < view.Bottom)
|
| | | {
|
| | | this.m_frameTable.Height = frame.Bottom;
|
| | | this.frameTable.Height = view.Bottom;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | /// 调整子FrameLayout的真实高度
|
| | | /// </summary>
|
| | | /// <param name="frame"></param>
|
| | | public void AdjustChidrenFrameRealHeight(FrameLayout frame)
|
| | | /// <param name="minHeight">最小高度</param>
|
| | | public void AdjustChidrenFrameRealHeight(FrameLayout frame, int minHeight = -1)
|
| | | {
|
| | | //获取坐标底部最下面的那个控件的底部坐标
|
| | | int value = this.GetLocationMostLastViewBottom(frame);
|
| | | if (minHeight != -1 && value < minHeight)
|
| | | {
|
| | | //没有超过最小高度
|
| | | return;
|
| | | }
|
| | | if (value != -1)
|
| | | {
|
| | | //调整桌布高度
|
| | |
| | | }
|
| | |
|
| | | //获取坐标底部最下面的那个控件的底部坐标
|
| | | int value = this.GetLocationMostLastViewBottom(this.m_frameTable);
|
| | | int value = this.GetLocationMostLastViewBottom(this.frameTable);
|
| | | if (value != -1)
|
| | | {
|
| | | //调整桌布高度
|
| | | this.m_frameTable.Height = value;
|
| | | this.frameTable.Height = value;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | this.AdjustTableHeight();
|
| | |
|
| | | var btnTemp = new BottomClickButton();
|
| | | if (btnTemp.Yaxis >= this.m_frameTable.Height + correctionsValue)
|
| | | if (btnTemp.Yaxis >= this.frameTable.Height + correctionsValue)
|
| | | {
|
| | | //没有超过
|
| | | return;
|
| | |
| | |
|
| | | this.frameBackTemp = new FrameLayout();
|
| | | frameBackTemp.Height = ControlCommonResourse.BodyFrameHeight - btnTemp.Yaxis + Application.GetRealHeight(23);
|
| | | this.AddChidrenFrame(frameBackTemp);
|
| | | this.AddChidren(frameBackTemp);
|
| | |
|
| | | this.rowSpace = oldRowSpace;
|
| | | }
|