using System;
|
using Shared;
|
|
namespace HDL_ON.UI.Music
|
{
|
public class MusicView
|
{
|
/// <summary>
|
///父控件
|
/// </summary>
|
public FrameLayout muiscFl = new FrameLayout
|
{
|
Height = Application.GetRealHeight(12 + 139),
|
Width = Application.GetRealWidth(375),
|
|
};
|
/// <summary>
|
///白色背景的控件
|
/// </summary>
|
public FrameLayout musicIfonFl = new FrameLayout
|
{
|
X = Application.GetRealWidth(16),
|
Y = Application.GetRealHeight(12),
|
Height = Application.GetRealHeight(139),
|
Width = Application.GetRealWidth(375 - 16 * 2),
|
BackgroundColor = Color.WhiteColor,
|
Radius= (uint)Application.GetRealHeight(12),
|
};
|
/// <summary>
|
///显示音乐状态图标
|
/// </summary>
|
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",
|
};
|
/// <summary>
|
///组合背景图
|
/// </summary>
|
public Button mergeBjBtn = new Button
|
{
|
X = Application.GetRealWidth(214),
|
Y = Application.GetRealHeight(18),
|
Width = Application.GetRealWidth(70),
|
Height = Application.GetRealHeight(25),
|
BackgroundColor = Color.ViewColor,
|
Radius = (uint)Application.GetRealHeight(12),
|
};
|
/// <summary>
|
///组合图标
|
/// </summary>
|
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",
|
};
|
/// <summary>
|
///组合文本
|
/// </summary>
|
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 = Color.TextColor,
|
TextSize=TextSize.Text12,
|
|
};
|
/// <summary>
|
///收藏图标
|
/// </summary>
|
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",
|
};
|
/// <summary>
|
/// 歌名名称
|
/// </summary>
|
public Button songNameBtn = new Button
|
{
|
X = Application.GetRealWidth(54),
|
Y = Application.GetRealHeight(12),
|
Width = Application.GetRealWidth(140),
|
Height = Application.GetRealHeight(20),
|
TextColor = Color.MusicTxet14Color,
|
TextSize = TextSize.Text14,
|
TextAlignment = TextAlignment.CenterLeft,
|
};
|
/// <summary>
|
/// 歌手名称
|
/// </summary>
|
public Button singerBtn = new Button
|
{
|
X = Application.GetRealWidth(54),
|
Y = Application.GetRealHeight(36),
|
Width = Application.GetRealWidth(120),
|
Height = Application.GetRealHeight(14),
|
TextColor = Color.MusicNoTxetColor,
|
TextSize = TextSize.Text10,
|
TextAlignment = TextAlignment.CenterLeft,
|
|
};
|
/// <summary>
|
/// 播放器名称
|
/// </summary>
|
public Button musicNameBtn = new Button
|
{
|
X = Application.GetRealWidth(54),
|
Y = Application.GetRealHeight(58),
|
Width = Application.GetRealWidth(140),
|
Height = Application.GetRealHeight(17),
|
TextColor = Color.MusicTxet14Color,
|
TextSize = TextSize.Text12,
|
TextAlignment = TextAlignment.CenterLeft,
|
};
|
/// <summary>
|
/// 区域名称
|
/// </summary>
|
public Button regionBtn = new Button
|
{
|
//Text = i.ToString(),
|
X = Application.GetRealWidth(54),
|
Y = Application.GetRealHeight(79),
|
Width = Application.GetRealWidth(120),
|
Height = Application.GetRealHeight(14),
|
TextColor = Color.MusicNoTxetColor,
|
TextSize = TextSize.Text10,
|
TextAlignment = TextAlignment.CenterLeft,
|
|
};
|
|
/// <summary>
|
/// 点击事件
|
/// </summary>
|
public Button clickBtn = new Button
|
{
|
Width = Application.GetRealWidth(130),
|
Height = Application.GetRealHeight(139),
|
};
|
|
/// <summary>
|
/// 上一曲
|
/// </summary>
|
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",
|
};
|
/// <summary>
|
/// 暂停/播放
|
/// </summary>
|
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",
|
};
|
/// <summary>
|
/// 下一曲
|
/// </summary>
|
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",
|
};
|
/// <summary>
|
/// 播放器界面的方法
|
/// </summary>
|
/// <param name="verticalRefresh"></param>
|
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);
|
|
}
|
}
|
}
|