繁体   English   中英

完成倒计时后,我想在文本视图中显示计数,例如:完成第一轮后,文本视图应显示 x1,第二轮 x2

[英]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

[在此处输入图片说明][1]

强调文字[1]: https : //i.stack.imgur.com/tNgwZ.png

创建一个全局变量并在每次计时器重置时增加它

例子

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM