using System; using HDL_ON.UI.Music; using Shared; namespace HDL_ON.UI.UI2.FuntionControlView.Music.View { public class MyListView : FrameLayout { /// /// 主控件 /// public FrameLayout popFra = new FrameLayout() { BackgroundColor = UI.Music.MusicColor.PopupBackgroundColor, }; /// /// 整个白色控件父 /// public FrameLayout dialogFra = new FrameLayout() { X = Application.GetRealWidth(16), Y = Application.GetRealHeight(187), Width = Application.GetRealWidth(344), Height = Application.GetRealHeight(460), BackgroundColor = UI.Music.MusicColor.WhiteColor, Radius = (uint)Application.GetRealHeight(12), }; /// /// 头部父控件 /// public FrameLayout topFra = new FrameLayout() { Width = Application.GetRealWidth(344), Height = Application.GetRealHeight(50), }; /// /// 模式图标控件 /// public Button orderIconBtn = new Button { X = Application.GetRealWidth(16), Y = Application.GetRealHeight(11), Width = Application.GetRealWidth(28), Height = Application.GetRealWidth(28), }; /// /// 模式文本控件 /// public Button orderTxetBtn = new Button { X = Application.GetRealWidth(60), Y = Application.GetRealHeight(14), Width = Application.GetRealWidth(120), Height = Application.GetRealHeight(22), TextColor = UI.Music.MusicColor.TextColor, TextSize = UI.Music.TextSize.Text16, TextAlignment = TextAlignment.CenterLeft, }; /// /// 关闭控件 /// public Button backIextBtn = new Button { X = Application.GetRealWidth(288),//300 Y = Application.GetRealHeight(15), Width = Application.GetRealWidth(28 + 12),//28 Height = Application.GetRealHeight(20), TextID = StringId.cancelMusic, TextColor = UI.Music.MusicColor.MusicNoTxetColor, TextSize = UI.Music.TextSize.Text14, TextAlignment = TextAlignment.CenterLeft, }; /// /// 线条控价 /// public Button lineBtn = new Button { // Y = topFra.Height - 1, Width = Application.GetRealWidth(344), //Height = UI.Music.H_W.Line, BackgroundColor = UI.Music.MusicColor.LineColor, }; /// ///显示歌曲列表父控件 /// public VerticalRefreshLayout verticalScrolViewLayout = new VerticalRefreshLayout { Y = Application.GetRealHeight(50), Height = Application.GetRealHeight(410), Width = Application.GetRealWidth(344), }; public void frameLayout(FrameLayout frame,A31MusicModel a31MusicModel) { switch (a31MusicModel.A31PlayStatus.loop) { //0列表循环,1单曲循环,2随机播放; case "0": orderIconBtn.UnSelectedImagePath = "MusicIcon/list.png"; orderTxetBtn.Text = Language.StringByID(StringId.listMode); break; case "1": orderIconBtn.UnSelectedImagePath = "MusicIcon/single.png"; orderTxetBtn.Text = Language.StringByID(StringId.singleMode); break; case "2": orderIconBtn.UnSelectedImagePath = "MusicIcon/random.png"; orderTxetBtn.Text = Language.StringByID(StringId.randomMode); break; } frame.AddChidren(popFra); popFra.AddChidren(dialogFra); dialogFra.AddChidren(topFra); topFra.AddChidren(orderIconBtn); topFra.AddChidren(orderTxetBtn); topFra.AddChidren(backIextBtn); lineBtn.Y = topFra.Height - 1; lineBtn.Height = UI.Music.H_W.Line; topFra.AddChidren(lineBtn); dialogFra.AddChidren(verticalScrolViewLayout); } } }