SearchView on RecyclerView no work how to fix?

You need a new reference to adapter in fetch() method, because after every search the returned item count is changing. That’s why in my example I have done like this in the fetch() method:

adapter = new CustomFirebaseRecylerAdapter<Model, CustomFirebaseRecylerAdapter.ViewHolder>(options);
        adapter.startListening();
        recyclerView.setAdapter(adapter);

try creating a new adapter instance in the fetch() method and then setting up the following:

adapter.startListening();
FindFriendsRecyclerList.setAdapter(adapter);
    

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top