title: How to add like counter Android Studio Firebase
body: <p><a href="https://i.stack.imgur.com/YBF3T.jpg" rel="nofollow noreferrer">this is the database link </a><a href="https://i.stack.imgur.com/YBF3T.jpg" rel="nofollow noreferrer">1</a>can anybody help me to add a like counter to this.please please 
  it should display the no:of likes and decease it when like is taken back
  my java code is below </p>
  
  <pre><code> private void onLikeClicked(View v) {
      boolean isLiked = !btnLike.isSelected();
      final String currentUserKey = User.currentKey();
  
      DatabaseReference likes = FirebaseDatabase.getInstance().getReference().child(Const.kDataLikeKey);
      DatabaseReference curLike = likes.child(mPostRef.getKey()).child(currentUserKey).child("liked");
  
      // update Model
      curLike.setValue(isLiked);
  
      // update UI
      btnLike.setSelected(isLiked);
  }
  </code></pre>
  
  <p><strong>This increment like count but doesn't decrements it</strong> i want it to get decremented when clicked back</p>