|
|
|
|
@ -8,6 +8,7 @@ import android.os.Handler;
|
|
|
|
|
import android.support.annotation.NonNull;
|
|
|
|
|
import android.support.annotation.Nullable;
|
|
|
|
|
import android.support.v4.view.ViewCompat;
|
|
|
|
|
import android.text.format.DateUtils;
|
|
|
|
|
import android.util.AttributeSet;
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
import android.view.KeyEvent;
|
|
|
|
|
@ -293,7 +294,7 @@ public class InputPanel extends LinearLayout
|
|
|
|
|
|
|
|
|
|
public void display() {
|
|
|
|
|
this.startTime.set(System.currentTimeMillis());
|
|
|
|
|
this.recordTimeView.setText("00:00");
|
|
|
|
|
this.recordTimeView.setText(DateUtils.formatElapsedTime(0));
|
|
|
|
|
ViewUtil.fadeIn(this.recordTimeView, FADE_TIME);
|
|
|
|
|
handler.postDelayed(this, TimeUnit.SECONDS.toMillis(1));
|
|
|
|
|
}
|
|
|
|
|
@ -310,10 +311,7 @@ public class InputPanel extends LinearLayout
|
|
|
|
|
long localStartTime = startTime.get();
|
|
|
|
|
if (localStartTime > 0) {
|
|
|
|
|
long elapsedTime = System.currentTimeMillis() - localStartTime;
|
|
|
|
|
recordTimeView.setText(String.format("%02d:%02d",
|
|
|
|
|
TimeUnit.MILLISECONDS.toMinutes(elapsedTime),
|
|
|
|
|
TimeUnit.MILLISECONDS.toSeconds(elapsedTime) -
|
|
|
|
|
TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(elapsedTime))));
|
|
|
|
|
recordTimeView.setText(DateUtils.formatElapsedTime(TimeUnit.MILLISECONDS.toSeconds(elapsedTime));
|
|
|
|
|
handler.postDelayed(this, TimeUnit.SECONDS.toMillis(1));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|