Recently I had a chance to develop a social networking application, I had to create a notification bubble over friends and messages, So I managed to do it like this.
This can be achieved with this library. https://github.com/jgilfelt/android-viewbadger
Include library in your project and add below code for your view.
View target = findViewById(R.id.target_view); BadgeView badge = new BadgeView(this, target); badge.setText("1"); badge.show();