简体   繁体   中英

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]

emphasized text [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');
  }

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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