title: Android - Firebase add to views count?
body: <p>So I have a <code>RecyclerView</code> which I populate with the <code>FirebaseRecyclerAdapter</code>. I retrieve the required data using this code:</p>
  
  <pre><code>FirebaseRecyclerAdapter&lt;HashMap,MViewHolder&gt; adapter1 = new FirebaseRecyclerAdapter&lt;HashMap, MViewHolder&gt;(HashMap.class,R.layout.list_item,MViewHolder.class,firebase.limitToLast(5)) {
          @Override
          protected void populateViewHolder(final MViewHolder mViewHolder, HashMap hashMap, int i) {
              mViewHolder.title_txt.setText(hashMap.get("title").toString());
              mViewHolder.body_txt.setText(hashMap.get("body").toString());
  
              Firebase userRef = new Firebase("https://yournewz.firebaseio.com/users/" + hashMap.get("poster").toString());
              ValueEventListener valueEventListener = new ValueEventListener() {
                  @Override
                  public void onDataChange(DataSnapshot dataSnapshot) {
                      mViewHolder.postedTxt.setText("Posted by: " + dataSnapshot.getValue().toString());
                  }
  
                  @Override
                  public void onCancelled(FirebaseError firebaseError) {
  
                  }
              };
  
              userRef.addValueEventListener(valueEventListener);
  
              mViewHolder.context = (MainFragment)getParentFragment();
              //mViewHolder.postedTxt.setText(poster);
          }
      };
  
   public static class MViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{
  
      TextView title_txt;
      TextView body_txt,postedTxt;
      MainFragment context;
  
      public MViewHolder(View view) {
          super(view);
          title_txt = (TextView)view.findViewById(R.id.title);
          body_txt = (TextView)view.findViewById(R.id.body);
          postedTxt = (TextView)view.findViewById(R.id.postedBy);
  
          view.setOnClickListener(this);
      }
  
      @Override
      public void onClick(View v) {
          int item = getAdapterPosition();
          int pos = 5 - item;
          Firebase firebase = new Firebase("https://yournewz.firebaseio.com/items");
          //firebase.get
          context.GoToStory(postedTxt.getText().toString(),title_txt.getText().toString(),body_txt.getText().toString());
      }
  }
  </code></pre>
  
  <p>I am trying to implement a view count that will store the amount of 'views' an item has. I want to make it so that when a user clicks on a recyclerview item, it adds a child to the item in the Firebase Database which is as follows:</p>
  
  <pre><code>yournews
  ----items
      ----QLEJCCNGJIDOS (item key)
          ----body: "text"
          ----title: "text"
          ----poster: "UID"
          ----views: "0"
  </code></pre>
  
  <p>Is there a way to get the item key from the <code>FirebaseRecyclerAdapter</code> to add 1 to the views child of the item each time it is clicked in the <code>RecyclerView</code>?</p>
  
  <p>Any help is greatly appreciated, thanks. (sorry for the poorly worded question)</p>