using System;
using Shared;
namespace HDL_ON.UI.Music.View
{
public class PlayView
{
///
///白色图片父控件
///
public FrameLayout musicBjFl = new FrameLayout
{
Y = Application.GetRealHeight(24),
X = Application.GetRealWidth(24),
Height = Application.GetRealHeight(526),
Width = Application.GetRealWidth(327),
BackgroundImagePath = "MusicIcon/playBj.png",
};
///
/// 音乐汉字
///
public Button musicNameBtn = new Button
{
X = Application.GetRealWidth(16),
Y = Application.GetRealHeight(16),
Width = Application.GetRealWidth(100),
Height = Application.GetRealHeight(33),
TextColor = MusicColor.MusicTxet14Color,
TextSize = TextSize.Text24,
TextAlignment = TextAlignment.CenterLeft,
TextID = StringId.a31Music,
};
///
/// 区域名称
///
public Button regionBtn = new Button
{
X = Application.GetRealWidth(16),
Y = Application.GetRealHeight(53),
Width = Application.GetRealWidth(100),
Height = Application.GetRealHeight(17),
TextColor = MusicColor.MusicNoTxetColor,
TextSize = TextSize.Text12,
TextAlignment = TextAlignment.CenterLeft,
};
///
///收藏图标
///
public Button collectIconBtn = new Button
{
X = Application.GetRealWidth(273),
Y = Application.GetRealHeight(14),
Width = Application.GetMinRealAverage(40),
Height = Application.GetMinRealAverage(40),
UnSelectedImagePath = "MusicIcon/collect.png",
SelectedImagePath = "MusicIcon/collectSelected.png",
};
///
///快,退进度条父控件
///
public FrameLayout fra = new FrameLayout
{
X = Application.GetRealWidth(63 + 2),
Y = Application.GetRealHeight(72),
Width = Application.GetRealWidth(202+12),
Height = Application.GetRealHeight(202+12),
};
///
///显示播放音乐图标
///
public Button musicIconBtn = new Button
{
//X = Application.GetRealWidth(63 + 2+20),
//Y = Application.GetRealHeight(72 + 6+20),
Width = Application.GetMinRealAverage(158),
Height = Application.GetMinRealAverage(158),
UnSelectedImagePath = "MusicIcon/musicIcon.png",
Gravity = Gravity.Center,
};
///
/// 快,退进度条
///
public DiyArcSeekBar diyArcSeekBar = new DiyArcSeekBar
{
Width = Application.GetMinRealAverage(202),
Height = Application.GetMinRealAverage(202),
ProgressBarColor = MusicColor.SelectedColor,
OpenAngle = 0,//开口角度
ArcWidth = Application.GetRealWidth(4),//进度宽度
ThumbImagePath = "MusicIcon/thumbImage.png",//进度条按钮图标
ThumbImageHeight = Application.GetMinRealAverage(8),//进度条按钮图标的高度(默认正方形:宽和高一样)
MaxValue=100,
Gravity = Gravity.Center,
SeekBarPadding = Application.GetMinRealAverage(3),
};
///
///音乐开始时间
///
public Button startTimeBtn = new Button
{
X = Application.GetRealWidth(22),
Y = Application.GetRealHeight(261),
Width = Application.GetRealWidth(37 + 5),
Height = Application.GetRealHeight(20),
TextColor = MusicColor.TextTimeColor,
TextSize = TextSize.Text14,
TextAlignment = TextAlignment.CenterLeft,
};
///
///音乐结束时间
///
public Button endTimeBtn = new Button
{
X = Application.GetRealWidth(269),
Y = Application.GetRealHeight(261),
Width = Application.GetRealWidth(37 + 5),
Height = Application.GetRealHeight(20),
TextColor = MusicColor.TextTimeColor,
TextSize = TextSize.Text14,
TextAlignment = TextAlignment.CenterRight,
};
///
/// 歌名名称(TextView超出长度自己滚动)
///
public TextView songNameTextView = new TextView
{
X = Application.GetRealWidth(62),
Y = Application.GetRealHeight(290),
Width = Application.GetRealWidth(203),
Height = Application.GetRealHeight(30),
TextColor = MusicColor.TextColor,
TextSize = TextSize.Text16,
};
///
/// 歌手名称
///
public Button singerBtn = new Button
{
X = Application.GetRealWidth(62),
Y = Application.GetRealHeight(322),
Width = Application.GetRealWidth(203),
Height = Application.GetRealHeight(21),
TextColor = MusicColor.MusicNoTxetColor,
TextSize = TextSize.Text12,
};
///
/// 播放顺序
///
public Button playOrderBtn = new Button
{
X = Application.GetRealWidth(70),
Y = Application.GetRealHeight(355),
Width = Application.GetMinRealAverage(28),
Height = Application.GetMinRealAverage(28),
UnSelectedImagePath = "MusicIcon/list.png",
};
///
/// 喜爱
///
public Button loveBtn = new Button
{
X = Application.GetRealWidth(150),
Y = Application.GetRealHeight(355),
Width = Application.GetMinRealAverage(28),
Height = Application.GetMinRealAverage(28),
UnSelectedImagePath = "MusicIcon/love1.png",
SelectedImagePath = "MusicIcon/loveSelected1.png",
};
///
/// 播放列表
///
public Button playlistBtn = new Button
{
X = Application.GetRealWidth(230),
Y = Application.GetRealHeight(355),
Width = Application.GetMinRealAverage(28),
Height = Application.GetMinRealAverage(28),
UnSelectedImagePath = "MusicIcon/playList.png",
};
///
/// 音量图标
///
public Button volIconBtn = new Button
{
X = Application.GetRealWidth(24),
Y = Application.GetRealHeight(414),
Width = Application.GetMinRealAverage(24),
Height = Application.GetMinRealAverage(24),
UnSelectedImagePath = "MusicIcon/vol.png",
};
///
/// 音量进度条
///
public DiyImageSeekBar volSeekBar = new DiyImageSeekBar
{
Y = Application.GetRealHeight(399),
X = Application.GetRealWidth(58),
Width = Application.GetRealWidth(215),
Height = Application.GetRealHeight(54),//进度条父控件背景高度
IsProgressTextShow = false,//显示百分比
IsClickable = true,//进度条是否滑动
ProgressBarColor = MusicColor.SelectedColor,//选中进度条颜色
ThumbImagePath = "MusicIcon/progressIcon.png",//进度条按钮图标
ThumbImageHeight = Application.GetMinRealAverage(54),//进度条按钮图标的高度(默认正方形:宽和高一样)
SeekBarViewHeight = Application.GetMinRealAverage(8),//进度条的高度
ProgressChangeDelayTime = 300,//0.3秒发送一次
SeekBarPadding = Application.GetRealWidth(20),
};
///
/// 音量值百分比;
///
public Button volValueBtn = new Button
{
X = Application.GetRealWidth(279 - 4),
Y = Application.GetRealHeight(418),
Width = Application.GetRealWidth(26 + 4),
Height = Application.GetRealHeight(17),
Text = "0%",
TextColor = MusicColor.MusicNoTxetColor,
TextSize = TextSize.Text12,
};
///
/// 上一曲
///
public Button prevBtn = new Button
{
X = Application.GetRealWidth(64),
Y = Application.GetRealHeight(466),
Width = Application.GetMinRealAverage(40),
Height = Application.GetMinRealAverage(40),
UnSelectedImagePath = "MusicIcon/prve1.png",
SelectedImagePath = "MusicIcon/prve1Selected.png",
};
///
/// 暂停/播放
///
public Button playBtn = new Button
{
X = Application.GetRealWidth(144),
Y = Application.GetRealHeight(466),
Width = Application.GetMinRealAverage(40),
Height = Application.GetMinRealAverage(40),
UnSelectedImagePath = "MusicIcon/pause1.png",
SelectedImagePath = "MusicIcon/play1.png",
};
///
/// 下一曲
///
public Button nextBtn = new Button
{
X = Application.GetRealWidth(224),
Y = Application.GetRealHeight(466),
Width = Application.GetMinRealAverage(40),
Height = Application.GetMinRealAverage(40),
UnSelectedImagePath = "MusicIcon/next1.png",
SelectedImagePath = "MusicIcon/next1Selected.png",
};
///
/// 播放界面的方法
///
///
public void viewFrameLayout(FrameLayout fL)
{
fL.AddChidren(musicBjFl);
musicBjFl.AddChidren(musicNameBtn);
musicBjFl.AddChidren(regionBtn);
musicBjFl.AddChidren(collectIconBtn);
musicBjFl.AddChidren(fra);
fra.AddChidren(musicIconBtn);
fra.AddChidren(diyArcSeekBar);
musicBjFl.AddChidren(startTimeBtn);
musicBjFl.AddChidren(endTimeBtn);
musicBjFl.AddChidren(songNameTextView);
musicBjFl.AddChidren(singerBtn);
musicBjFl.AddChidren(playOrderBtn);
musicBjFl.AddChidren(loveBtn);
musicBjFl.AddChidren(playlistBtn);
musicBjFl.AddChidren(volIconBtn);
musicBjFl.AddChidren(volSeekBar);
musicBjFl.AddChidren(volValueBtn);
musicBjFl.AddChidren(prevBtn);
musicBjFl.AddChidren(playBtn);
musicBjFl.AddChidren(nextBtn);
}
}
}