title: How to bring the Badge Count in front of the Button in android?
body: <p>I am trying to show the number of notifications on the top right corner of the button and I am using ViewBadger (an external library : android-viewbadger <a href="http://jgilfelt.github.io/android-viewbadger" rel="nofollow">http://jgilfelt.github.io/android-viewbadger</a>) for it. The problem I am facing right now is the badge is showing at the back of the button like this</p>
  
  <p><a href="http://i.stack.imgur.com/rZbDu.jpg" rel="nofollow">here is the snapshot</a></p>
  
  <p>But I want to display the badge in front like facebook or any other app</p>
  
  <p>Here is my code</p>
  
  <pre><code>package com.daimkhan.badgerview;
  
  import android.os.Bundle;
  import android.support.v7.app.AppCompatActivity;
  import android.view.View;
  
  import com.readystatesoftware.viewbadger.BadgeView;
  
  public class MainActivity extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      View button = findViewById(R.id.button);
      final BadgeView badge = new BadgeView(this, button);
      badge.setText("8");
      badge.setTextSize(12);
      badge.setBadgePosition(BadgeView.POSITION_TOP_RIGHT);
  
      badge.setBadgeMargin(0, 0);
  
      badge.show();
  
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              badge.hide();
          }
      });
  
    }
  }
  </code></pre>
  
  <p>please help me in this, thanks in advance :)</p>