public static String stringForTime(int timeMs, boolean isFull) {
int totalSeconds = timeMs / 1000;
int seconds = totalSeconds % 60;
int minutes = (totalSeconds / 60) % 60;
int hours = totalSeconds / 3600;
mFormatBuilder.setLength(0);
if (isFull) {
return mFormatter.format("%02d:%02d:%02d", hours, minutes, seconds).toString();
} else {
if (hours > 0) {
return mFormatter.format("%d:%02d:%02d", hours, minutes, seconds).toString();
} else {
return mFormatter.format("%02d:%02d", minutes, seconds).toString();
}
}
int totalSeconds = timeMs / 1000;
int seconds = totalSeconds % 60;
int minutes = (totalSeconds / 60) % 60;
int hours = totalSeconds / 3600;
mFormatBuilder.setLength(0);
if (isFull) {
return mFormatter.format("%02d:%02d:%02d", hours, minutes, seconds).toString();
} else {
if (hours > 0) {
return mFormatter.format("%d:%02d:%02d", hours, minutes, seconds).toString();
} else {
return mFormatter.format("%02d:%02d", minutes, seconds).toString();
}
}
}
private String getTimeFormLong(long time) {
if (time <= 0) {
return "00:00";
}
int secondnd = (int) ((time / 1000) / 60);
int million = (int) ((time / 1000) % 60);
String f = secondnd >= 10 ? String.valueOf(secondnd) : "0" + String.valueOf(secondnd);
String m = million >= 10 ? String.valueOf(million) : "0" + String.valueOf(million);
return f + ":" + m;
}