I'm trying to create a Countdown app for an event. I will need to subtract the current time from the future event time, and display the difference in Days, Hours, minutes and seconds.
So far I have managed to make an app that displays the time with this code below. What do I need to add to it to display the time until say Christmas, for example? Preferably the results would change in real time.
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);