[英]After finishing the countdown I want to show number of counts in a Text View ,eg: after finishing 1st round Text view should show x1, for 2nd round x2
[enter image description here][1] [在此处输入图片说明][1]
emphasized text [1]: https://i.stack.imgur.com/tNgwZ.png强调文字[1]: https : //i.stack.imgur.com/tNgwZ.png
Create a global var and increment that with every timer reset创建一个全局变量并在每次计时器重置时增加它
Example例子
int timerCounts = 0;
@Override
onCreate....
private void starttimer(){
......
.....
onFinish(){
timerCounts++;
your_text_view_to_show_counts.setText(timerCounts+'X');
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.