Search through RecyclerView using Searchview

前端 未结 5 400
谎友^
谎友^ 2020-12-16 23:31

I want to search through RecyclerView, I have List (BaseOfCards is my getter&setter class) My RecyclerViewAdapter<

5条回答
  •  春和景丽
    2020-12-16 23:56

    From the time the other positive answer was done, I've now implemented a fast async filter using AsyncTask in my FlexibleAdapter library, performance are very good with big lists, having animations too! The Adapter is configurable to enable/disable properties in filtering result to increase speed when necessary. Another big advantage is also that interface is still responding to the user.

    Test done in my Samsung S3 running Android 6: with a starting list of 10.450 items, from the moment the background process starts it takes ~1s to filter a character and select 3.890 items.

    I've done also a Wiki page with all the details to use filter with the Adapter.

提交回复
热议问题