解析我的字符串时遇到问题:
@Before
问题是
String dateString = "Mon Nov 23 2015 08:00:00";
try {
DateFormat readFormat = new SimpleDateFormat( "EEE MMM dd yyyy HH:mm:ss");
Date date = readFormat.parse(dateString);
return date;
} catch (ParseException e) {
Log.e("Error", e.getMessage());
return null;
}
你能帮我吗?感谢。
答案 0 :(得分:0)
尝试使用$(".play").on('click', function () {
var key = $(this).attr('key');
var nowplay = $(this); // variable for now playing class .play
EvalSound(this, key);
$(".play").not(this).removeClass("pause");
$(this).toggleClass("pause");
$(this).hasClass("pause") ? $(".playerbottom").addClass("pausebottom") : $(".playerbottom").removeClass("pausebottom");
$(".playerbottom").on('click', function () {
$(this).hasClass("pausebottom") ? nowplay.addClass("pause") : nowplay.removeClass("pause");
});
});
var thissound = new Audio();
var currentKey;
function EvalSound(el, key) {
thissound.addEventListener('ended', function () {
// done playing
$(el).removeClass("pause");
$(".playerbottom").removeClass("pausebottom");
});
if (currentKey !== key) thissound.src = "http://99centbeats.com/1e4cb5f584d055a0992385c1b2155786/" + key;
currentKey = key;
if (thissound.paused) thissound.play();
else thissound.pause();
currentPlayer = thissound;
}
$(".volume_slider").slider({
value : 75,
step : 1,
range : 'min',
min : 0,
max : 100,
slide : function(){
var value = $(".volume_slider").slider("value");
thissound.volume = (value / 100);
}
});
$(".playerbottom").on('click', function () {
$(this).toggleClass("pausebottom");
if (thissound.paused) thissound.play();
else thissound.pause();
});
区域设置:
UK