title: Firebase Query for RecyclerView
body: <p>I want to get <strong>Date</strong> of "<strong>Friends</strong>" very 1st child/child. For this, i wrote query as  <a href="https://i.stack.imgur.com/xav5m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xav5m.png" alt="enter image description here"></a></p>
  
  <pre><code>Query query = FirebaseDatabase.getInstance()
              .getReference()
              .child("Friends").child("SQyOq80egYehjqx4sgiyeNcW8P02");
  </code></pre>
  
  <p>in the above query, i want to specifically get date of "SQyOq80egYehjqx4sgiyeNcW8P02". How can i do that? Above query not working. </p>
  
  <p>i've previously write these values by this code:</p>
  
  <pre><code> final String currentDate = DateFormat.getDateInstance().format(new Date());
                      mFriendDatabase.child(mCurrent_user.getUid()).child(user_id).setValue(currentDate)
                              .addOnCompleteListener(new OnCompleteListener&lt;Void&gt;() {
                                  @Override
                                  public void onComplete(@NonNull Task&lt;Void&gt; task) {
  
                                      mFriendDatabase.child(user_id).child(mCurrent_user.getUid()).setValue(currentDate)
                                              .addOnCompleteListener(new OnCompleteListener&lt;Void&gt;() {
                                                  @Override
                                                  public void onComplete(@NonNull Task&lt;Void&gt; task) {
                                                      mFriendReqDatabase.child(mCurrent_user.getUid()).child(user_id).removeValue().addOnSuccessListener(new OnSuccessListener&lt;Void&gt;() {
                                                          @Override
                                                          public void onSuccess(Void aVoid) {
  
                                                              mFriendReqDatabase.child(user_id).child(mCurrent_user.getUid()).removeValue().addOnSuccessListener(new OnSuccessListener&lt;Void&gt;() {
                                                                  @Override
                                                                  public void onSuccess(Void aVoid) {
  
  
                                                                      mProfileSendReqBtn.setEnabled(true);
                                                                      mCurrent_state = "friends";
                                                                      mProfileSendReqBtn.setText("UnFriend");
  
                                                                      mDeclineBtn.setVisibility(View.INVISIBLE);
                                                                      mDeclineBtn.setEnabled(false);
  
  
                                                                  }
                                                              });
                                                          }
                                                      });
                                                  }
                                              });
                                      }
                                  });
  
                      }
  </code></pre>
  
  <p>Recycler code:</p>
  
  <pre><code>FirebaseRecyclerOptions&lt;Friends&gt; options =
                  new FirebaseRecyclerOptions.Builder&lt;Friends&gt;()
                          .setQuery(query, Friends.class)
                          .build();
  
          Log.d("sdfsdfsdf", options.getSnapshots().toString());
  
          firebaseRecyclerAdapter = new FirebaseRecyclerAdapter&lt;Friends, FriendsViewHolder&gt;(options) {
              @Override
              public FriendsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
                  // Create a new instance of the ViewHolder, in this case we are using a custom
                  // layout called R.layout.message for each item
                  View view = LayoutInflater.from(parent.getContext())
                          .inflate(R.layout.adapter_users_activity_layout, parent, false);
  
                  return new FriendsViewHolder(view);
              }
  
              @Override
              protected void onBindViewHolder(final FriendsViewHolder friendsViewHolder, int position, Friends friends) {
  //                Log.d("sdfsdfdf", friends.getDate().toString());
                  friendsViewHolder.setDate(friends.getDate());
  </code></pre>