In Android, Chronometer is a class that implements a simple timer. Chronometer is a subclass of TextView. This class helps us to add a timer in our app. You can give Timer start time in the elapsedRealTime() timebase and it start counting from that. If we don’t give base time then it will use the time at which time we call start() method. By default a chronometer displays the current timer value in the form of MM:SS or H:MM:SS.
Questions tagged [chronometer]
302 questions
6
votes
1 answer
Set HH:MM:SS of Chronometer
I knew the format of chronometer can be MM:SS or HH:MM:SS, but I want to know how to use setFormat() and getFormat() to set HH:MM:SS pattern(now is MM:SS).
At this time, I use:
android:format="@string/chronometer_initial_format" to set Format by…

Yoo
- 1,421
- 8
- 20
- 36
6
votes
2 answers
Problem starting with chronometer
My chronometer is always starting from 0:10 or like some other times... it s not starting from 0:01 itself..any one can help me
Thank you,

ezhil
- 2,606
- 7
- 26
- 30
6
votes
2 answers
Starting Two (or More) Functions Simultaneously in Android
I'm in the process of designing a chronometer / countdown timer app for Android 2.2 and would like one button press to start both the chronometer and the timer simultaneously. So, ideally, I'd like the seconds (time) on both the chronometer and…

aLearner
- 1,051
- 14
- 30
5
votes
1 answer
How to get time difference between two dates in Android App?
I'm trying to implement a time counter (counts up from 0) which basically gets the saved time variable (startTime, which was created as soon as the user tapped a button) and subtracts the current time (Calendar.getInstance() maybe?) so that the…

iVikD
- 296
- 7
- 21
5
votes
0 answers
Can't start the chronometer or not working properly
When I start the chronometer from another class with the start() function. It doesn't seem to be starting. It always gives me the beginning value "00:00" and nothing more.
public class Kronometre {
Context context;
long countUp;
…

iCould7
- 635
- 6
- 10
5
votes
3 answers
Android - calculations with time elapsed in the Chronometer
In Chronometer, how can we extract the time elapsed and store it separately in variables.
For example, store the number of hours, minutes, seconds elapsed in separate int variables?
Is it possible? If Yes, How?
Apart from Chronometer can it be…
user2134555
4
votes
1 answer
How can I set the start time for a chronometer
I have an application that has a chronometer, I need to set the start time to a difference between to dates
How can I do that?

JRivero_SWCO
- 43
- 1
- 4
4
votes
1 answer
What is the best timer technique for exact one second intervals?
I am writing a simple timekeeping app for a specialized outdoor sport.
The app performs a series of calculations every second, and displays information of interest to the user. Elapsed time is key to the accuracy of the calculated results. Ideally…

jday
- 149
- 3
- 10
4
votes
3 answers
EditText not showing, typing text on Bottom sheet dialog
In bottom sheet dialog, we have some editext's . When typing those edittext typing can possible but after typing the typing text is not showing also not showing the edittext cursor.
When screen touch / scroll edittext is updating. I think its my…

Abhijith KP
- 41
- 5
4
votes
2 answers
Why does the isTheFinalCountDown method in Chronometer class open a YouTube video?
The public method isTheFinalCountDown just opens a YouTube video for the song The Final Count Down.
All the doc has to say about it is this:
whether this is the final countdown
Since this is a public api, what would be a real world use-case for…

MadScientist
- 2,134
- 14
- 27
4
votes
1 answer
How can I avoid the difference of milliseconds between two Chronometers start time?
I have two Chronometer in an activity.
First Chronometer is for elapsed time, and Second Chronometer is for interval time.
For Ex.:-
We chose 5 Min elapsed time and 30 Seconds interval time, now we start both timers at the same time by pressing…

Pankaj Mundra
- 1,401
- 9
- 25
4
votes
1 answer
How to contain value of android chronometer with change in orientation
I am building a simple timer app in which I am using android chronometer to track time passed. but when I start chronometer and change orientation to landscape the chronometer resets and and show 00:00 again. I want it to retain its value.
layouts…

AddyProg
- 2,960
- 13
- 59
- 110
4
votes
2 answers
Android Chronometer start with defined value
I have an application in which I'm displaying a chronometer to the user for what he's doing.
Whenever the activity goes to the background (wether by home button, or back) I save that time (in seconds) and when the activity is brought back, I want to…

Nuno Gonçalves
- 6,202
- 7
- 46
- 66
3
votes
1 answer
How to set the display time in a chronometer
I am using a chronometer as a kind of stop watch.
I want to start it not at 0 but at some other time, for example, 8 seconds, or 10 minutes, etc.
When I try to call setBase, passing in the ms time, it shows non-numeric characters.
What to…

Victor Grazi
- 15,563
- 14
- 61
- 94
3
votes
2 answers
Android milliseconds
So I'm trying to write a stopwatch app that displays time in milliseconds, but for some reason it won't work. Basically I have just a togglebutton that, after being pressed, starts printing the milliseconds from the start time to the current time...…

user1123530
- 561
- 3
- 7
- 17