Code example for GregorianCalendar

Methods: add, clear, format

0
		return String.format(getActivity().getString(R.string.playPosition),
				progressString, totalString);
	} 
 
	private CharSequence durationString(final int duration) {
		final Calendar date = new GregorianCalendar();
		date.clear();
		date.add(Calendar.MILLISECOND, duration);
		if (duration < HOUR) {
			return DateFormat.format(DURATION_FORMAT, date);
		} else { 
			return DateFormat.format(DURATION_FORMAT_WITH_HOUR, date);
		} 
	} 
 
	@Click(resName = "pauseButton") 
	void onPauseButtonClicked() { 
		listener.onPauseSelected();
	} 
 
	@Click(resName = "previousButton")