| | |
| | | /// <summary> |
| | | /// 父控件 |
| | | /// </summary> |
| | | public FrameLayout musicViewFl = new FrameLayout |
| | | public RowLayout musicViewFl = new RowLayout |
| | | { |
| | | Width = Application.GetRealWidth(375), |
| | | Height = Application.GetRealHeight(44), |
| | | LineColor= MusicColor.WhiteColor, |
| | | }; |
| | | |
| | | /// <summary> |
| | |
| | | Y = Application.GetRealHeight(11), |
| | | // Width = wText + Application.GetRealWidth(5), |
| | | Height = Application.GetRealHeight(22), |
| | | TextColor = Color.MusicTxet14Color, |
| | | TextColor = MusicColor.MusicTxet14Color, |
| | | TextSize = TextSize.Text16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Name = "song", |
| | |
| | | public Button singerBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(11), |
| | | //Width = Application.GetRealWidth(220) - wText,//歌名长度小于250才可以显示歌手出来 |
| | | //Width = Application.GetRealWidth(220) - wText,//歌名长度小于220才可以显示歌手出来 |
| | | Height = Application.GetRealHeight(22), |
| | | TextColor = Color.MusicNoTxetColor, |
| | | TextColor = MusicColor.MusicNoTxetColor, |
| | | TextSize = TextSize.Text12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | //Text =("-" +songs.Artist).Trim(), |
| | |
| | | var wText = songBtn.GetTextWidth() + Application.GetRealWidth(15); |
| | | if (wText > Application.GetRealWidth(220)) |
| | | { |
| | | wText = Application.GetRealWidth(220);//(歌曲+歌手)宽度最大值时260 |
| | | wText = Application.GetRealWidth(220);//(歌曲+歌手)宽度最大值时220 |
| | | } |
| | | songBtn.Width = wText; |
| | | singerBtn.X = songBtn.Right; |
| | | singerBtn.Width = Application.GetRealWidth(220) - wText;//歌名长度小于250才可以显示歌手出来 |
| | | singerBtn.Width = Application.GetRealWidth(220) - wText;//歌名长度小于220才可以显示歌手出来 |
| | | singerBtn.Text = string.IsNullOrEmpty(songs.Artist) ? "-Unkonw" : "-" + songs.Artist.Trim(); |
| | | var music = A31MusicModel.Current.LoveMusicInfoList.Find((m) => m.URL == songs.URL); |
| | | if (music != null) |