curioustechizen / android-ago

An Android TextView that always displays an auto refreshing relative time span with respect to a reference time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

this work fine in recyclerviews?

webserveis opened this issue · comments

If you have 1000 items in a recyclerview, running 1000 threads every time?
Or it detects when the item is not displayed and thus ends its thread of execution

@webserveis Yes it is safe to use in RecyclerViews. This library does not use threads at all. It simply uses Runnables as a way to tell a Handler what to do when the time changes.

The number of scheduled handlers is slightly more than the number of recyclerview items on screen. Once a View is no longer visible, the callback for its handler is removed.