| | |
| | | private int leftMargin; |
| | | private int bottomMargin; |
| | | private int rightMargin; |
| | | private int mWidth; |
| | | private int mHeight; |
| | | /// <summary> |
| | | /// 一行几个元素 |
| | | /// </summary> |
| | |
| | | this.Width = Application.GetRealWidth(width); |
| | | this.Height = Application.GetRealHeight(height); |
| | | this.Radius = (uint)Application.GetRealHeight(radius); |
| | | this.mWidth = this.Width; |
| | | this.mHeight = this.Height; |
| | | |
| | | |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="mList">列表</param> |
| | | /// <param name="mRowNumber">一行多少个元素</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param> |
| | | public void LoadButtonPage(List<KeypadEntity> mList, int mRowNumber, int defaultIndex = -1) |
| | | { |
| | | if (mList == null || mList.Count == 0) |
| | |
| | | /// </summary> |
| | | /// <param name="mList">列表</param> |
| | | /// <param name="list"> 列表中索引,表示某一条宽度加宽,没有默认(new List<int>)</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param> |
| | | public void LoadButtonPage(List<KeypadEntity> mList, List<int> list,int defaultIndex=-1) |
| | | { |
| | | if (mList == null || mList.Count == 0) |
| | |
| | | ///动态加载数字按键界面 |
| | | /// </summary> |
| | | /// <param name="mList">列表</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param> |
| | | public void LoadNumberButtonPage(List<KeypadEntity> mList) |
| | | { |
| | | if (mList == null || mList.Count == 0) |
| | |
| | | /// 影片布局 |
| | | /// </summary> |
| | | /// <param name="mList">列表</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param> |
| | | public void LoadImagePage(List<MovieLibrary> mList) |
| | | { |
| | | if (mList == null || mList.Count == 0) |
| | |
| | | /// 影片布局 |
| | | /// </summary> |
| | | /// <param name="mRowNumber">一行多少个元素</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param> |
| | | public void LoadImagePage(List<MovieLibrary> mList, int mRowNumber) |
| | | { |
| | | if (mList == null || mList.Count == 0) |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | private int currnetheightValue1 = 0; |
| | | private int currnetWidthValue1 = 0; |
| | | private int heightMaxValue1 = ImageFramlayout.heightFrameLayout; |
| | | private int widthMaxValue1 = ImageFramlayout.widthFrameLayout; |
| | | //获取相对一个纬度值 |
| | | private int widthDimensionValue1 = Application.GetRealWidth(343) - Application.GetRealHeight(ImageFramlayout.widthFrameLayout / 2); |
| | | /// <summary> |
| | | /// 加载影片列表布局 |
| | | /// (特殊布局) |
| | | /// </summary> |
| | | /// <param name="mList">列表</param> |
| | | public void LoadImagePage(List<ImageFramlayout> imageFramlayoutList) |
| | | { |
| | | |
| | | if (imageFramlayoutList==null||imageFramlayoutList.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | //int currnetheightValue = 0; |
| | | //int currnetWidthValue = 0; |
| | | //int heightMaxValue = ImageFramlayout.heightFrameLayout; |
| | | //int widthMaxValue = ImageFramlayout.widthFrameLayout; |
| | | ////获取相对一个纬度值 |
| | | //int heightDimensionValue = this.Height - Application.GetRealHeight(this.topMargin) - Application.GetRealHeight(this.bottomMargin) - Application.GetRealHeight(heightMaxValue / 2); |
| | | //int widthDimensionValue = this.Width - Application.GetRealWidth(this.leftMargin) - Application.GetRealWidth(this.rightMargin) - Application.GetRealHeight(widthMaxValue / 2); |
| | | for (int i = 0; i < imageFramlayoutList.Count; i++) |
| | | { |
| | | var imageFram = imageFramlayoutList[i]; |
| | | if (imageFram == null) |
| | | { |
| | | continue; |
| | | } |
| | | imageFram.AddView(this); |
| | | imageFram.Y =Application.GetRealHeight(this.topMargin) + Application.GetRealHeight(currnetheightValue1); |
| | | imageFram.X = Application.GetRealWidth(currnetWidthValue1); |
| | | currnetWidthValue1 += (widthMaxValue1 + 8);//8是隔间值 |
| | | if (widthDimensionValue1 < Application.GetRealWidth(currnetWidthValue1)) |
| | | { |
| | | currnetheightValue1 += (heightMaxValue1 + 20);//20是隔间值 |
| | | currnetWidthValue1 = 0; |
| | | } |
| | | |
| | | imageFram.SetClickListener((fl) => |
| | | { |
| | | if (imageFram.Tag != null && imageFram.Tag is MovieLibrary) |
| | | { |
| | | selectImageAction?.Invoke((MovieLibrary)imageFram.Tag); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 水平滑动布局 |
| | | /// </summary> |
| | | /// <param name="mList">列表</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param> |
| | | public void LoadHorizontalPage(List<FilterCategoryEntity> mList, int defaultIndex = -1) |
| | | { |
| | | if (mList == null || mList.Count == 0) |