private void processsearch(String s)
{
FirebaseRecyclerOptions<Calories> options =
new FirebaseRecyclerOptions.Builder<Calories>()
.setQuery(FirebaseDatabase.getInstance().getReference().child("Food").orderByChild("Name").startAt(s).endAt(s+"\uf8ff"), Calories.class)
.build();
adapter=new myadapter(options);
adapter.startListening();
recview.setAdapter(adapter);
}
how can I make this search method case insensitive? I've tried doing
String n="Name";
n.equalsIgnoreCase()
; then replaced the word name in orderbychild with n but it didn't work
I've also tried toLowerCase
on n, I can't seem to find the method .equalsIgnoreCase()
inside the recylcerOptions that's why i tried to do it on the outside