0

I Have applied searching in my application. I used PageKeyedDataSource with loadInitial(),loadAfter(),loadBefore() method .And the data is set on RecyclerView .Now I want to apply search feature HOw can I apply search in Paging .Please Help Me on this.

 public DriverRecyclerAdapter(Context context){
    super(DIFF_CALLBACK);
    this.mCtx = context;
}
 @Override
public void onBindViewHolder(@NonNull MyDriverViewHolder holder, int position) {
    Driverlist exampleDriverList=getItem(position);
 }
Ahmad Sattout
  • 2,248
  • 1
  • 19
  • 42

1 Answers1

1

I would advice you use a different endpoint to get the searched pages, rather than using the same full pages and searching them.

Not sure if you are using an API or not, but simply don't get full pages then filter them. Get pages that have the filters applied to them directly.

Ahmad Sattout
  • 2,248
  • 1
  • 19
  • 42