Kameswari
Kameswari

Reputation: 758

Setting custom image view as action bar's menu icon

I would like to add one of the menu icons of the action bar as below.

enter image description here

I need an icon and a bubble on top of that and I need to display a number on that at run time. Is it possible to do? I have Googled regarding this, but couldn't find exact way to do.

Thanks in advance.

Upvotes: 1

Views: 578

Answers (2)

AndruBoy
AndruBoy

Reputation: 116

what you want is call "badge"

A simple way to "badge" any given Android view at runtime without having to cater for it in layout.

try this Lib

https://github.com/jgilfelt/android-viewbadger

Upvotes: 4

Ali Azhar
Ali Azhar

Reputation: 1803

You will have to define custom layout for your action bar as mentioned in the tutorial here and to display counter above the Imageview android notification class can be used.

Upvotes: 0

Related Questions