Open
Description
Welcome to FirebaseUI and thanks for submitting an issue!
Please take a look at open issues, as well as resolved issues, to see if your issue is either already being addressed, or has been solved by someone else.
If not, please feel free to fill in the following info so we can help faster!
Step 1: Are you in the right place?
- For issues or feature requests related to the code in this repository file a GitHub issue.
- For general technical questions, post a question on StackOverflow tagged appropriately.
- For general Firebase discussion, use the firebase-talk google group
- For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel
Step 2: Describe your environment
- Android device: Oppo A37f
- Android OS version: Lolipop 5.0
- Firebase/Play Services SDK version: firebase-firestore:21.6.0
- FirebaseUI version: firebase-ui-firestore:6.3.0'
Step 3: Describe the problem:
I Was trying to implement a search based on firestore and Firebase Firestore Paging adapter.
Each time when i change the query and called updateOptions() the recyclerview blinks and displays the items.
Steps to reproduce:
- create new query in onQueryTextChange() of searchview and call updateOptions()
Observed Results:
The Recyclerview blinks while loading data
Expected Results:
The recyclerview should not blink like using notifyDataSetChanged()
Relevant Code:
searchBox.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
return false;
}
@Override
public boolean onQueryTextChange(String newText) {
if(!TextUtils.isEmpty(newText))
{
search(newText);
return true;
}
return false;
}
});
private void search(String query)
{
if(TextUtils.isEmpty(query))
{
dbSearchQuery=quizRef.orderBy("searchText").startAt(query.toLowerCase()).endAt(query.toLowerCase()+"\uf8ff").whereEqualTo("uid",user.getUid());
}
options=new FirestorePagingOptions.Builder<QuizSearchModel>()
.setQuery(dbSearchQuery, config, QuizSearchModel.class)
.build();
adapter.updateOptions(options);
}