Closed iman2420 closed 6 years ago
I do it by this code finally:
` @Override
public void run() {
long millis = System.currentTimeMillis() - startTime;
int seconds = (int) (millis / 1000);
int minutes = seconds / 60;
seconds = seconds % 60;
int milliSeconds = (int) ((millis - seconds) / 100) % 10;
String finalResult = String.format(Locale.getDefault(), "%d:%02d,%01d", minutes, seconds, milliSeconds);
Log.d(TAG, "run: millisecond: " + withOutMilli);
if (finalResult.contains(withOutMilli)) {
tickerView.setText(finalResult, false);
} else {
tickerView.setText(finalResult, true);
}
withOutMilli = finalResult.substring(0, finalResult.length() - 1);
timerHandler.postDelayed(this, 100);
}`
I use this library for Timer view like this:
i want to prevent the millisecond character to animation. how to do it?