我正在嘗試爲事件創建倒計時應用程序。我需要從未來事件時間中減去當前時間,並顯示天,小時,分鐘和秒的差異。簡單的Android/Java倒計時應用程序
到目前爲止,我已經設法制作了一個應用程序,用以下代碼顯示時間。例如,我需要添加什麼才能顯示聖誕節前的時間?優選地,結果將實時改變。
Calendar c = Calendar.getInstance();
System.out.println("Current time => " + c.getTime());
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
String formattedDate = df.format(c.getTime());
text.setText(formattedDate);
sir ...,。我們怎麼補充,你可以舉例 – rajshree
意思是? ....... –
意味着http://stackoverflow.com/questions/21701393/android-how-to-make-calender-like-countdown-clock – rajshree