I’m looking for a way to make the Chronometer in Android (preferably 1.6 and upwards) show 10ths of a second while counting up.
Is it possible to do this? If not, is there a free (and preferably open source) library that does the same? Failing that I’ll write my own, but I’d rather use someone else’s!
Not really. You could pass a format string that shows tenths of a second, but the
Chronometeritself only updates every second. The update frequency is baked into the code.The
Chronometersource is available under the Apache License 2.0, so you can modify it to suit. Find all occurrences of1000and change them to100, and you’re probably most of the way there.Bear in mind that this
Chronometercan be used in an activity but not an app widget, since customizedViewclasses are not supported by the app widget framework.