How to realize the Countdown Circle Control of imitating Keep Motion rest by Android
This article mainly introduces Android how to achieve Keep sports rest countdown round control, the article is very detailed, has a certain reference value, interested friends must read it!
Usage
Xml:
Code:
@ Override protected void onCreate (@ Nullable Bundle savedInstanceState) {super.onCreate (savedInstanceState); setContentView (R.layout.keep_act); ButterKnife.bind (this); / / countdown monitoring keep1.setCountdownListener (new KeepCountdownView.CountdownListener () {@ Override public void onStart () {} @ Override public void onEnd () {}}) } @ OnClick (R.id.b1) public void b1 (View v) {keep1.plus (5); / / add 5s} @ OnClick (R.id.b2) public void b2 () {keep1.post (new Runnable () {@ Override public void run () {keep1.startCountDown (); / / start countdown}})) } @ OnClick (R.id.b4) public void b4 () {keep1.reset (); / / reset} above is all the content of the article "how to imitate Keep motion rest countdown circle control by Android". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!