这是我的参考链接: RecyclerView流程编码 https://www.youtube.com/watch?v=3WR4QAiVuCw&t=43s
搜索数据
private void searchData(String s) {
String userInput = s;
Query query = notebookRef.whereEqualTo("lastname", userInput);
FirestoreRecyclerOptions<NoteData> options = new FirestoreRecyclerOptions.Builder<NoteData>()
.setQuery(query, NoteData.class)
.build();
adapter = new NoteDataAdapter(options);
recyclerView = findViewById(R.id.idRecyclerView);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
}