UX improvement, not showing total time when not recording

This commit is contained in:
Jimmy Shih
2013-12-17 17:20:12 -08:00
parent e31550c524
commit 1dbebf0529
@@ -120,11 +120,14 @@ public class TrackController {
} }
handler.removeCallbacks(updateTotalTimeRunnable); handler.removeCallbacks(updateTotalTimeRunnable);
totalTime = isRecording ? getTotalTime() : 0L; totalTimeTextView.setVisibility(isRecording ? View.VISIBLE : View.INVISIBLE);
totalTimeTextView.setText(StringUtils.formatElapsedTimeWithHour(totalTime)); if (isRecording) {
if (isRecording && !isPaused) { totalTime = getTotalTime();
totalTimeTimestamp = System.currentTimeMillis(); totalTimeTextView.setText(StringUtils.formatElapsedTimeWithHour(totalTime));
handler.postDelayed(updateTotalTimeRunnable, ONE_SECOND); if (!isPaused) {
totalTimeTimestamp = System.currentTimeMillis();
handler.postDelayed(updateTotalTimeRunnable, ONE_SECOND);
}
} }
} }