Implementation method of Android control chrome timer

Chrome is a simple timer. You can give it a start time and time it. Or if you don't give it a start time, it will use your time to start the call. By default, it will display the value of the current timer in the form of "minute: second" or "H: mm: SS", or the timer value in set (string) format can be used to an arbitrary string

1. Important attributes

Android: Format: defines the format of time, such as: HH: mm: SS

2. Important methods

Setbase (long base): sets the countdown timer

Setformat (string format): sets the format for displaying time.

Start(): start timing

Stop (): stop timing

Setonchrometertickellistener (chrome. Onchrometertickellistener listener): called when the timer changes.

3. Examples

Layout file

Main program:

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>