| | |
| | | |
| | | BaseFramLayout typeFLayout = new BaseFramLayout(); |
| | | fLayout.AddChidren(typeFLayout); |
| | | int span= Application.GetRealHeight(20);//间隔 |
| | | int x = Application.GetRealHeight(16);//X轴偏移量 |
| | | HorizontalFramLayout horizontalFram = new HorizontalFramLayout(); |
| | | int span= 20;//间隔 |
| | | int x= 16;//X轴偏移量 |
| | | int width =375-x; |
| | | int height = 28; |
| | | HorizontalFramLayout horizontalFram = new HorizontalFramLayout(width, height); |
| | | typeFLayout.AddChidren(horizontalFram); |
| | | horizontalFram.Y = Application.GetRealHeight(20); |
| | | horizontalFram.X = x; |
| | | horizontalFram.Y = Application.GetRealHeight(span); |
| | | horizontalFram.X = Application.GetRealHeight(x); |
| | | horizontalFram.SetIndex(2); |
| | | horizontalFram.SetList(horizontalFram.GetTestData); |
| | | horizontalFram.InitControl(); |
| | |
| | | Console.WriteLine("1"); |
| | | |
| | | }; |
| | | HorizontalFramLayout horizontalFram1 = new HorizontalFramLayout(); |
| | | HorizontalFramLayout horizontalFram1 = new HorizontalFramLayout(width, height); |
| | | typeFLayout.AddChidren(horizontalFram1); |
| | | horizontalFram1.Y = horizontalFram.Bottom + span; |
| | | horizontalFram1.X = x; |
| | | horizontalFram1.Y = horizontalFram.Bottom + Application.GetRealHeight(span); |
| | | horizontalFram1.X = Application.GetRealHeight(x); |
| | | horizontalFram1.SetIndex(2); |
| | | horizontalFram1.SetList(horizontalFram1.GetTestData); |
| | | horizontalFram1.InitControl(); |
| | |
| | | Console.WriteLine("2"); |
| | | |
| | | }; |
| | | HorizontalFramLayout horizontalFram2 = new HorizontalFramLayout(); |
| | | HorizontalFramLayout horizontalFram2 = new HorizontalFramLayout(width, height); |
| | | typeFLayout.AddChidren(horizontalFram2); |
| | | horizontalFram2.Y = horizontalFram1.Bottom + span; |
| | | horizontalFram2.X = x; |
| | | horizontalFram2.Y = horizontalFram1.Bottom + Application.GetRealHeight(span); |
| | | horizontalFram2.X = Application.GetRealHeight(x); |
| | | horizontalFram2.SetIndex(2); |
| | | horizontalFram2.SetList(horizontalFram2.GetTestData); |
| | | horizontalFram2.InitControl(); |
| | | horizontalFram2.SelectTypeEvent += (index) => { |
| | | Console.WriteLine("3"); |
| | | }; |
| | | HorizontalFramLayout horizontalFram3 = new HorizontalFramLayout(); |
| | | HorizontalFramLayout horizontalFram3 = new HorizontalFramLayout(width, height); |
| | | typeFLayout.AddChidren(horizontalFram3); |
| | | horizontalFram3.Y = horizontalFram2.Bottom + span; |
| | | horizontalFram3.X = x; |
| | | horizontalFram3.Y = horizontalFram2.Bottom + Application.GetRealHeight(span); |
| | | horizontalFram3.X = Application.GetRealHeight(x); |
| | | horizontalFram3.SetIndex(2); |
| | | horizontalFram3.SetList(horizontalFram3.GetTestData); |
| | | horizontalFram3.InitControl(); |
| | |
| | | imageFLayout.LoadImagePage(); |
| | | imageFLayout.selectAction += (index) => |
| | | { |
| | | Console.WriteLine("5"); |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | DetailPage detailPage = new DetailPage(); |
| | | MainPage.BasePageView.AddChidren(detailPage); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | detailPage.Show(); |
| | | }); |
| | | |
| | | }; |
| | | imageFLayout.AdjustRealHeight(16); |
| | | } |