using System; using Shared; namespace HDL_ON.UI.Music { public class MusicView { /// ///父控件 /// public FrameLayout muiscFl = new FrameLayout { Height = Application.GetRealHeight(12 + 139), Width = Application.GetRealWidth(375), }; /// ///白色背景的控件 /// public FrameLayout musicIfonFl = new FrameLayout { X = Application.GetRealWidth(16), Y = Application.GetRealHeight(12), Height = Application.GetRealHeight(139), Width = Application.GetRealWidth(375 - 16 * 2), BackgroundColor = MusicColor.WhiteColor, Radius= (uint)Application.GetRealHeight(12), }; /// ///显示音乐状态图标 /// public Button iconBtn = new Button { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(15), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), UnSelectedImagePath = "MusicIcon/playStatus.png", }; /// ///组合背景图 /// public Button mergeBjBtn = new Button { X = Application.GetRealWidth(214), Y = Application.GetRealHeight(18), Width = Application.GetRealWidth(70), Height = Application.GetRealHeight(25), BackgroundColor = MusicColor.ViewColor, Radius = (uint)Application.GetRealHeight(12), }; /// ///组合图标 /// public Button mergeIconBtn = new Button { X = Application.GetRealWidth(214 + 13), Y = Application.GetRealHeight(18 + 5), Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), UnSelectedImagePath = "MusicIcon/Merge.png", }; /// ///组合文本 /// public Button mergeBtn = new Button { TextID=StringId.merge, X = Application.GetRealWidth(214 + 33), Y = Application.GetRealHeight(18 + 4), Width = Application.GetRealWidth(24+3+5), Height = Application.GetRealHeight(17), TextColor = MusicColor.TextColor, TextSize=TextSize.Text12, }; /// ///收藏图标 /// public Button collectIconBtn = new Button { X = Application.GetRealWidth(299), Y = Application.GetRealHeight(10), Width = Application.GetMinRealAverage(40), Height = Application.GetMinRealAverage(40), UnSelectedImagePath = "MusicIcon/collect.png", SelectedImagePath = "MusicIcon/collectSelected.png", }; /// /// 歌名名称 /// public Button songNameBtn = new Button { X = Application.GetRealWidth(54), Y = Application.GetRealHeight(12), Width = Application.GetRealWidth(140), Height = Application.GetRealHeight(20), TextColor = MusicColor.MusicTxet14Color, TextSize = TextSize.Text14, TextAlignment = TextAlignment.CenterLeft, }; /// /// 歌手名称 /// public Button singerBtn = new Button { X = Application.GetRealWidth(54), Y = Application.GetRealHeight(36), Width = Application.GetRealWidth(120), Height = Application.GetRealHeight(14), TextColor = MusicColor.MusicNoTxetColor, TextSize = TextSize.Text10, TextAlignment = TextAlignment.CenterLeft, }; /// /// 播放器名称 /// public Button musicNameBtn = new Button { X = Application.GetRealWidth(54), Y = Application.GetRealHeight(40),//58 Width = Application.GetRealWidth(140), Height = Application.GetRealHeight(17), TextColor = MusicColor.TextCancelColor, TextSize = TextSize.Text12, TextAlignment = TextAlignment.CenterLeft, }; /// /// 区域名称 /// public Button regionBtn = new Button { //Text = i.ToString(), X = Application.GetRealWidth(54), Y = Application.GetRealHeight(61),//79 Width = Application.GetRealWidth(120), Height = Application.GetRealHeight(14), TextColor = MusicColor.MusicNoTxetColor, TextSize = TextSize.Text10, TextAlignment = TextAlignment.CenterLeft, }; /// /// 点击事件 /// public Button clickBtn = new Button { Width = Application.GetRealWidth(130), Height = Application.GetRealHeight(139), }; /// /// 上一曲 /// public Button prevBtn = new Button { X = Application.GetRealWidth(163), Y = Application.GetRealHeight(101), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), UnSelectedImagePath = "MusicIcon/prev.png", SelectedImagePath = "MusicIcon/prevSeletced.png", }; /// /// 暂停/播放 /// public Button playBtn = new Button { X = Application.GetRealWidth(233), Y = Application.GetRealHeight(101), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), UnSelectedImagePath = "MusicIcon/pause.png", SelectedImagePath = "MusicIcon/play.png", }; /// /// 下一曲 /// public Button nextBtn = new Button { X = Application.GetRealWidth(303), Y = Application.GetRealHeight(101), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), UnSelectedImagePath = "MusicIcon/next.png", SelectedImagePath = "MusicIcon/nextSelected.png", }; /// /// 播放器界面的方法 /// /// public void View(VerticalRefreshLayout verticalRefresh) { verticalRefresh.AddChidren(muiscFl); muiscFl.AddChidren(musicIfonFl); musicIfonFl.AddChidren(iconBtn); musicIfonFl.AddChidren(mergeBjBtn); musicIfonFl.AddChidren(mergeIconBtn); musicIfonFl.AddChidren(mergeBtn); musicIfonFl.AddChidren(collectIconBtn); musicIfonFl.AddChidren(songNameBtn); //musicIfonFl.AddChidren(singerBtn); musicIfonFl.AddChidren(musicNameBtn); musicIfonFl.AddChidren(regionBtn); musicIfonFl.AddChidren(clickBtn); musicIfonFl.AddChidren(prevBtn); musicIfonFl.AddChidren(playBtn); musicIfonFl.AddChidren(nextBtn); } } }