| | |
| | | public VerticalListControl(int i_rowSpace = 0)
|
| | | {
|
| | | this.rowSpace = Application.GetRealHeight(i_rowSpace);
|
| | | #if iOS
|
| | | //自动偏移取消
|
| | | if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
|
| | | {
|
| | | (this.uiView as UIKit.UIScrollView).ContentInsetAdjustmentBehavior = UIKit.UIScrollViewContentInsetAdjustmentBehavior.Never;
|
| | | }
|
| | | #endif
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | if (this.maxHeight != -1)
|
| | | {
|
| | | this.Height = this.maxHeight;
|
| | | #if iOS
|
| | | this.ReLocation();
|
| | | #endif
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | /// <param name="addSpace">当真实高度超过原有高度时,是否添加空白</param>
|
| | | public void AdjustRealHeight(int bottomSpace, bool addSpace = true)
|
| | | {
|
| | | //总之,先重置至最大
|
| | | this.RecoverHeight();
|
| | |
|
| | | int count = this.ChildrenCount;
|
| | | if (count <= 0)
|
| | | {
|
| | | frameBackTemp?.RemoveFromParent();
|
| | | frameBackTemp = null;
|
| | | if (maxHeight != -1)
|
| | | {
|
| | | //还原为最大高度
|
| | | this.Height = maxHeight;
|
| | | }
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | frameBackTemp = null;
|
| | | //缩小控件高度
|
| | | this.Height = realHeight;
|
| | | #if iOS
|
| | | this.ReLocation();
|
| | | #endif
|
| | | }
|
| | | else if (addSpace == true && bottomSpace > 0 && realHeight > this.maxHeight)
|
| | | {
|
| | |
| | | {
|
| | | //还原为最大高度
|
| | | this.Height = maxHeight;
|
| | | #if iOS
|
| | | this.ReLocation();
|
| | | #endif
|
| | | }
|
| | | return;
|
| | | }
|