0
我希望在systemTime等于特定值时立即执行newCradleLoading的停止方法。在特定日期执行操作时间
这里我的伪代码:
newtonCradleLoading.start();
Calendar rightNow = Calendar.getInstance();
Calendar en = Calendar.getInstance();
en.set(2015, 10, 20, 21, 48, 00);
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String formattedDate = df.format(rightNow.getTime());
String reqd = df.format(en.getTime());
while (formattedDate != reqd) {
rightNow = Calendar.getInstance();
formattedDate = df.format(rightNow.getTime());
}
newtonCradleLoading.stop();
的问题是,当我选择要显示该片段,应用程序冻结的选项。
库可以发现在:https://github.com/yankai-victor/Loading
为了使它更清楚,我想看到牛顿摇篮运行,直到SYSTEMTIME等于所需的时间和日期。
谢谢!
我因此未得到如何实现它在我的情况 –