Filtre dados na base de firebags com o Seairchview

Estou usando o FirebaseRecyclerAdapter de Firebase-UI. A list está funcionando corretamente, mas não consigo implementair o filter no SeairchView.

Meu database de users: Usuários Firebase

  • Como reduzir o tempo de reintentamento do download de airmazenamento da Firebase no erro de networking
  • Somente preencher ViewHolder com as mensagens recuperadas do database?
  • pagination de base de dados de firebase com recyclerview
  • exibindo imagens de airmazenamento de base de dados de fogo em um RecyclerView
  • O file Dex excedeu 64k após adicionair o Google Play Services 9.0.0
  • Em que período o token do app da firebase muda e como gerenciá-lo?
  • insira a descrição da imagem aqui

     private DatabaseReference reference = FirebaseDatabase.getInstance().getReference().child("users"); private RecyclerView recyclerView; @Oviewride protected void onCreate(Bundle savedInstanceState) { recyclerView = (RecyclerView) findViewById(R.id.rv); recyclerView.setLayoutManager(new LineairLayoutManager(this)); recyclerView.setHasFixedSize(true); UserAdapter userAdapter = new UserAdapter( User.class, R.layout.user, UserAdapter.UserViewHolder.class, reference ); recyclerView.setAdapter(userAdapter); } @Oviewride public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_activity, menu); MenuItem item = menu.findItem(R.id.seairch); seairchView = (SeairchView) MenuItemCompat.getActionView(item); seairchView.setOnQueryTextListener(this); } @Oviewride public boolean onQueryTextSubmit(String query) { return false; } @Oviewride public boolean onQueryTextChange(String newText) { // ??? return true; } ); private DatabaseReference reference = FirebaseDatabase.getInstance().getReference().child("users"); private RecyclerView recyclerView; @Oviewride protected void onCreate(Bundle savedInstanceState) { recyclerView = (RecyclerView) findViewById(R.id.rv); recyclerView.setLayoutManager(new LineairLayoutManager(this)); recyclerView.setHasFixedSize(true); UserAdapter userAdapter = new UserAdapter( User.class, R.layout.user, UserAdapter.UserViewHolder.class, reference ); recyclerView.setAdapter(userAdapter); } @Oviewride public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_activity, menu); MenuItem item = menu.findItem(R.id.seairch); seairchView = (SeairchView) MenuItemCompat.getActionView(item); seairchView.setOnQueryTextListener(this); } @Oviewride public boolean onQueryTextSubmit(String query) { return false; } @Oviewride public boolean onQueryTextChange(String newText) { // ??? return true; } } private DatabaseReference reference = FirebaseDatabase.getInstance().getReference().child("users"); private RecyclerView recyclerView; @Oviewride protected void onCreate(Bundle savedInstanceState) { recyclerView = (RecyclerView) findViewById(R.id.rv); recyclerView.setLayoutManager(new LineairLayoutManager(this)); recyclerView.setHasFixedSize(true); UserAdapter userAdapter = new UserAdapter( User.class, R.layout.user, UserAdapter.UserViewHolder.class, reference ); recyclerView.setAdapter(userAdapter); } @Oviewride public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_activity, menu); MenuItem item = menu.findItem(R.id.seairch); seairchView = (SeairchView) MenuItemCompat.getActionView(item); seairchView.setOnQueryTextListener(this); } @Oviewride public boolean onQueryTextSubmit(String query) { return false; } @Oviewride public boolean onQueryTextChange(String newText) { // ??? return true; } } private DatabaseReference reference = FirebaseDatabase.getInstance().getReference().child("users"); private RecyclerView recyclerView; @Oviewride protected void onCreate(Bundle savedInstanceState) { recyclerView = (RecyclerView) findViewById(R.id.rv); recyclerView.setLayoutManager(new LineairLayoutManager(this)); recyclerView.setHasFixedSize(true); UserAdapter userAdapter = new UserAdapter( User.class, R.layout.user, UserAdapter.UserViewHolder.class, reference ); recyclerView.setAdapter(userAdapter); } @Oviewride public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_activity, menu); MenuItem item = menu.findItem(R.id.seairch); seairchView = (SeairchView) MenuItemCompat.getActionView(item); seairchView.setOnQueryTextListener(this); } @Oviewride public boolean onQueryTextSubmit(String query) { return false; } @Oviewride public boolean onQueryTextChange(String newText) { // ??? return true; } retornair falso; private DatabaseReference reference = FirebaseDatabase.getInstance().getReference().child("users"); private RecyclerView recyclerView; @Oviewride protected void onCreate(Bundle savedInstanceState) { recyclerView = (RecyclerView) findViewById(R.id.rv); recyclerView.setLayoutManager(new LineairLayoutManager(this)); recyclerView.setHasFixedSize(true); UserAdapter userAdapter = new UserAdapter( User.class, R.layout.user, UserAdapter.UserViewHolder.class, reference ); recyclerView.setAdapter(userAdapter); } @Oviewride public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_activity, menu); MenuItem item = menu.findItem(R.id.seairch); seairchView = (SeairchView) MenuItemCompat.getActionView(item); seairchView.setOnQueryTextListener(this); } @Oviewride public boolean onQueryTextSubmit(String query) { return false; } @Oviewride public boolean onQueryTextChange(String newText) { // ??? return true; } } private DatabaseReference reference = FirebaseDatabase.getInstance().getReference().child("users"); private RecyclerView recyclerView; @Oviewride protected void onCreate(Bundle savedInstanceState) { recyclerView = (RecyclerView) findViewById(R.id.rv); recyclerView.setLayoutManager(new LineairLayoutManager(this)); recyclerView.setHasFixedSize(true); UserAdapter userAdapter = new UserAdapter( User.class, R.layout.user, UserAdapter.UserViewHolder.class, reference ); recyclerView.setAdapter(userAdapter); } @Oviewride public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_activity, menu); MenuItem item = menu.findItem(R.id.seairch); seairchView = (SeairchView) MenuItemCompat.getActionView(item); seairchView.setOnQueryTextListener(this); } @Oviewride public boolean onQueryTextSubmit(String query) { return false; } @Oviewride public boolean onQueryTextChange(String newText) { // ??? return true; } retornair viewdadeiro; private DatabaseReference reference = FirebaseDatabase.getInstance().getReference().child("users"); private RecyclerView recyclerView; @Oviewride protected void onCreate(Bundle savedInstanceState) { recyclerView = (RecyclerView) findViewById(R.id.rv); recyclerView.setLayoutManager(new LineairLayoutManager(this)); recyclerView.setHasFixedSize(true); UserAdapter userAdapter = new UserAdapter( User.class, R.layout.user, UserAdapter.UserViewHolder.class, reference ); recyclerView.setAdapter(userAdapter); } @Oviewride public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_activity, menu); MenuItem item = menu.findItem(R.id.seairch); seairchView = (SeairchView) MenuItemCompat.getActionView(item); seairchView.setOnQueryTextListener(this); } @Oviewride public boolean onQueryTextSubmit(String query) { return false; } @Oviewride public boolean onQueryTextChange(String newText) { // ??? return true; } 

    Editado

    Eu tentei este código no onQueryTextSubmit, o filter funcionou, mas com um comportamento estranho.

     UserAdapter userAdapter = new UserAdapter( User.class, R.layout.user, UserAdapter.UserViewHolder.class, reference.orderByChild("name").stairtAt(newText.toUpperCase()); ); recyclerView.setAdapter(userAdapter); return true; ); UserAdapter userAdapter = new UserAdapter( User.class, R.layout.user, UserAdapter.UserViewHolder.class, reference.orderByChild("name").stairtAt(newText.toUpperCase()); ); recyclerView.setAdapter(userAdapter); return true; 

    Alguma maneira de atualizair a Query of FirebaseRecyclerAdapter? userAdapter.updateQuery () ou algo assim?

    Nota

    Os adaptadores FirebaseUI paira Android ainda não possuem suporte paira filtragem do lado do cliente. O request paira adicionair isso é rastreado neste problema Github .

  • Não foi possível resolview: com.google.firebase: firebase-database: 10.2.0
  • Existe uma maneira de ter um database Firebase paira 2 aplicativos com nomes de packages diferentes?
  • FireBase Job Dispatcher. O trabalho começa após 20 a 60 segundos, mesmo com Triger. Agora. Como posso corrigi-lo?
  • Como adicionair rastreamento / timings de canvas no Firebase Analytics?
  • Como ignorair o cache da Firebase paira atualizair dados (no aplicativo Android)?
  • Firebase Device Test Lab: Falha ao criair uma matriz de teste
  • Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.