Skip to content Skip to sidebar Skip to footer

If There Is Data In Query Or Path It Show Data In Firestorerecycleradapter. But When There Is No Data At That Path

I use FirestoreRecyclerAdapter with query. I show the loading till it's not getting into onBindViewHolder(). If it comes to onBindViewHolder then I close the dialog. But in my scen

Solution 1:

I got Answer

  @Override
                    public void onDataChanged() {
                        if(dialog != null && dialog.isShowing()){
                            dialog.dismiss();

                        }

                        if(getItemCount() == 0){

                            remoteListRV.setVisibility(View.GONE);
                            msgTv.setVisibility(View.VISIBLE);
                            msgTv.setText("No "+ appType +" Available  !!!!");


                        }else {

                            remoteListRV.setVisibility(View.VISIBLE);
                            msgTv.setVisibility(View.GONE);

                        }

                    }

Post a Comment for "If There Is Data In Query Or Path It Show Data In Firestorerecycleradapter. But When There Is No Data At That Path"