title: Show specific comments from adapter in recyclerview
body: <p>I am working on the comment session on an android app using Model with FirestoreRecyclerAdapter. The comment stores on Firestore and I use Model and adapter to show comments text which store in text_review. Here is my model:</p>
  
  <pre><code>public class Comment {
      float fireness_rating;
      String post_id;
      String review_time;
      String receiver_id;
      String text_review;
  
  
      public Comment(){
          //empty const needed.
      }
  
      Comment(float fireness_rating, String post_id, String review_time, String receiver_id, String text_review){
          this.fireness_rating=fireness_rating;
          this.post_id=post_id;
          this.review_time=review_time;
          this.receiver_id=receiver_id;
          this.text_review=text_review;
  
      }
  
      public float getFireness_rating() {
          return fireness_rating;
      }
  
      public String getPost_id() {
          return post_id;
      }
  
      public String getReview_time() {
          return review_time;
      }
  
      public String getReceiver_id() {
          return receiver_id;
      }
  
      public String getText_review() {
          return text_review;
      }
  }
  
  
  </code></pre>
  
  <p>The model contains five elements, but I am mainly focusing on text_review. If the user has text comments inside, the text_review will contain the text the users type and store on firestore. This is the firestore structure after the user comments with text_review.</p>
  
  <p><a href="https://i.stack.imgur.com/lkWTh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lkWTh.png" alt="enter image description here"></a></p>
  
  <p>As I mentioned, if there are no actual text comment insides the text_review should be empty. I've built an adapter to recursive all the list of comments to present on my activity pages. Here is my adapter.</p>
  
  <pre><code>public class Comment_Adapter extends FirestoreRecyclerAdapter&lt;Comment, Comment_Adapter.CommentHolder&gt; {
  
      public Comment_Adapter(@NonNull FirestoreRecyclerOptions&lt;Comment&gt; options){
          super(options);
      }
  
      @Override
      protected void onBindViewHolder(@NonNull final CommentHolder holder, int i, @NonNull Comment model) {
  
          final String commented_userid = model.getReceiver_id();
          Log.d("comment_adapter_debug", commented_userid);
  
          //shown only if the use has comment which in text_review
          Query q = FirebaseFirestore.getInstance().collection("user_reviews").document(commented_userid).collection("fairness").whereGreaterThan("text_review", "");
          q.get().addOnCompleteListener(new OnCompleteListener&lt;QuerySnapshot&gt;() {
              @Override
              public void onComplete(@NonNull Task&lt;QuerySnapshot&gt; task) {
                  Log.d("comment_adapter_debug", "has comment inside x");
  
                  //retrieve info, you can ignore this part.               FirebaseFirestore.getInstance().collection("users").document(commented_userid).get().addOnCompleteListener(new OnCompleteListener&lt;DocumentSnapshot&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;DocumentSnapshot&gt; task) {
                          if (task.isSuccessful()) {
                              DocumentSnapshot document = task.getResult();
                              String first_name = document.get("first_name").toString();
                              String last_name = document.get("last_name").toString();
                              String username = document.get("username").toString();
                              Log.d("comment_adapter_debug", first_name + " " + last_name + ": w/ username= " + username);
  
                              holder.CommentedFullName.setText(first_name + " " + last_name);
                              holder.CommentedUser.setText("@" + username);
                          } else {
                              Log.d("comment_adapter_debug", "no comment yet for this user.");
                          }
  
                      }
                  });
              }
  
          });
          String oldstring = model.getReview_time();
          Date dt = new Date(oldstring);
          String timeStamp = new SimpleDateFormat("MMM dd, yyyy").format(dt);
          holder.CommentedDate.setText(timeStamp);
          holder.Comment.setText(model.getText_review());
  
      }
  
      @NonNull
      @Override
      public CommentHolder onCreateViewHolder(ViewGroup parent, int viewType) {
  
          View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_comment, parent, false);
          return new CommentHolder(v);
      }
  
      class CommentHolder extends RecyclerView.ViewHolder{
          private ImageView CommentedIcon;
          private TextView CommentedFullName;
          private TextView CommentedUser;
          private TextView CommentedDate;
          private TextView Comment;
  
          public CommentHolder(View itemView){
              super(itemView);
              CommentedIcon = itemView.findViewById(R.id.commented_icon);
              CommentedFullName = itemView.findViewById(R.id.commented_fullname);
              CommentedUser = itemView.findViewById(R.id.commented_user);
              CommentedDate = itemView.findViewById(R.id.commented_date);
              Comment = itemView.findViewById(R.id.commented);
          }
      }
  
  }
  </code></pre>
  
  <p>and this is the image
  <a href="https://i.stack.imgur.com/yhTyp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yhTyp.png" alt="enter image description here"></a></p>
  
  <p>All I want is only show there are actual comment ("aaa" from the pic), and the red circle should not be shown since there is no comment exist ("text_review" == ""). My approach is to make a query whereGreaterThan("text_review", "") which means to check if text_review contains texts. If so, show the list, otherwise, skip the whole list. I know it is a little bit long but any help would appreciate.</p>