title: Hide recyclerview when there is no item to show with condition
body: <p>I am facing a problem to hide <code>RecyclerView</code>. From Last 2 night's I am looking for the solution but I have failed to find it.</p>
  
  <p>I am using firebase <code>recycleradapter</code> to show value in <code>recyclerview</code>. When ever someone click the <code>viewholderitem</code> i save his <code>Uid</code> under the <code>datasnapshot</code> key. </p>
  
  <p>So to show the value if <code>datasnapshot</code> don't have the <code>uid</code> key show the value in <code>recyclerview</code>. If the <code>datasnapshot</code> have the <code>uid</code> key don't show his data . everything works fine . But i want to hide the <code>recyclerview</code> and show a <code>textview</code> when every <code>datasnapshot</code> have the uid key and there is nothing to show in the <code>recyclerview</code>. My problem is in the last line . I can't hide the <code>recyclerview</code> and how the <code>textview</code>. </p>
  
  <pre><code>FirebaseRecyclerOptions options = new FirebaseRecyclerOptions.Builder&lt;ViewsAdapter&gt;()
                  .setQuery(ViewsRef,ViewsAdapter.class)
                  .build();
  
  
          adapter = new FirebaseRecyclerAdapter&lt;ViewsAdapter, ViewsAdapterHolder&gt;(options) {
  
              @Override
              protected void onBindViewHolder(@NonNull final ViewsAdapterHolder holder, int position, @NonNull ViewsAdapter model) {
                  String userIds = getRef(position).getKey();
                  assert userIds != null;
                  ViewsRef.child(userIds).addValueEventListener(new ValueEventListener() {
                      @Override
                      public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
  
  
                          if (dataSnapshot.hasChild(Uid)){
                              Long date = dataSnapshot.child(Uid).getValue(Long.class);
  
                              assert date != null;
                              int dat = date.intValue();
  
                              if (dat!=Date){
                                  recyclerView.removeAllViews();
                                  dataSnapshot.child(Uid).getRef().setValue(null);
                                  adapter.startListening();
  
  
                              }
  
                              ViewGroup.LayoutParams layoutParams =holder.itemView.getLayoutParams();
                              layoutParams.width= ViewGroup.LayoutParams.MATCH_PARENT;
                              layoutParams.height= 0;
                              holder.itemView.setLayoutParams(layoutParams);
  
  
  
  
  
  
  
                          }else {
  
                              //get the data from child and show in recyclerview
  
                              holder.button.setOnClickListener(new View.OnClickListener() {
                                  @Override
                                  public void onClick(View v) {
  
                          }
  
  
  
                      }
  
                      @Override
                      public void onCancelled(@NonNull DatabaseError databaseError) {
  
                      }
                  });
  
              }
  
              @NonNull
              @Override
              public ViewsAdapterHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
                  View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.viewsview,viewGroup,false);
                  return new ViewsAdapterHolder(view);
              }
  
  
  
          };
  
          recyclerView.setAdapter(adapter);
  </code></pre>