How to handle multiple countdown timers in RecyclerView?

后端 未结 5 2206
长情又很酷
长情又很酷 2021-02-10 06:45

I have a Recyclerview , and I need to display a countdown on every row.

Here is a similar question coutndown timers in listview It has a good solution ,

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-10 07:26

    You can create CountDownTimer reference in ViewHolder class and create its instance in onBindViewHolder method of Adapter.

    It works perfectly.

    Tested Myself.

提交回复
热议问题