title: Unable to get child of Current User Id for RecyclerView
body: <p>I want to set RecyclerView with Child of Current User Id by using <code>getCurrentUser().getUid()</code>.The data structure you can see in image below, <a href="https://i.stack.imgur.com/PTLbH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PTLbH.png" alt="enter image description here"></a></p>
  
  <p>In image above, <strong>SQyOq80egYehjqx4sgiyeNcW8P02</strong> is <strong>current userId</strong> and I want to get all child of those id and show in RecyclerView. In above image, the child is <strong>wed5qPTCdcQVzVlRcBrMo1NX43v1</strong> and their value is <strong>Sep 29, 2018</strong>. My question is how to get those childern values separately and show in RecyclerView. As an example, I wrote code for <strong>Date</strong> (the value of current userId), which gives fatal error. I know error in Model class which I am unable to understand. </p>
  
  <p><strong>Note:</strong> this line gives error.  <code>Log.d("sdfsdfdgfdfsdfd", blogPost.getDate());</code></p>
  
  <p>Activity:</p>
  
  <pre><code>    protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main2);
  
          RecyclerView recyclerView = findViewById(R.id.recycler_view);
          recyclerView.setLayoutManager(new LinearLayoutManager(this));
  
          String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();
          DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();
          Query query = rootRef.child("Friends").child(uid);
  
          FirebaseRecyclerOptions&lt;BlogPost&gt; firebaseRecyclerOptions = new FirebaseRecyclerOptions.Builder&lt;BlogPost&gt;()
                  .setQuery(query, BlogPost.class)
                  .build();
  
          firebaseRecyclerAdapter = new FirebaseRecyclerAdapter&lt;BlogPost, BlogPostHolder&gt;(firebaseRecyclerOptions) {
              @Override
              protected void onBindViewHolder(@NonNull BlogPostHolder blogPostHolder, int position, @NonNull BlogPost blogPost) {
  
                  Log.d("sdfsdfdgfdfsdfd", blogPost.getDate());
                  blogPostHolder.setBlogPost(blogPost);
              }
  
              @Override
              public BlogPostHolder onCreateViewHolder(ViewGroup parent, int viewType) {
                  View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item, parent, false);
  
                  return new BlogPostHolder(view);
              }
          };
          recyclerView.setAdapter(firebaseRecyclerAdapter);
      }
  
      @Override
      protected void onStart() {
          super.onStart();
          firebaseRecyclerAdapter.startListening();
      }
  
      @Override
      protected void onStop() {
          super.onStop();
  
          if (firebaseRecyclerAdapter!= null) {
              firebaseRecyclerAdapter.stopListening();
          }
      }
  
      private class BlogPostHolder extends RecyclerView.ViewHolder {
          private TextView  userDateTextView;
  
          BlogPostHolder(View itemView) {
              super(itemView);
              userDateTextView = itemView.findViewById(R.id.user_date);
          }
  
          void setBlogPost(BlogPost blogPost) {
              String date = blogPost.getDate();
              userDateTextView.setText(date);
          }
      }
  }
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>public class BlogPost {
      public String date;
  
      public BlogPost() {}
  
      public BlogPost(String date) {
          this.date = date;
      }
  
      public String getDate() {
          return date;
      }
  
      public void setDate(String date) {
          this.date = date;
      }
  
  
  }
  </code></pre>