How to To Add Badge Item Count to icon in android app using android studio

2 7,440

Add Badge Item Count to icon

Welcome to another interesting tutorial related to Android. Today I am going to describe how you can Add Badge Item Count to icon your Android Application. A Badge is used to display number notification, item/product count, message etc. Not only Android supports it, a number of other Applications also make use of it for example Ipad, Iphone, Window and Web Apps.

We will make Application in which we will add Badge in Image button and Android button. It’s little bit complicated so there is no shortcut to implement it.

STEPS TO FOLLOW

Before following these steps you must have installed JDK 7.0 or above and Android 2.0 on your device or PC.

  1. Create an xml file item_count_num and create a rectangle with 12dp corner radius, inside Drawable

2.Add Relativelayout, Buttons and text to modify activity_main.xml. The activity_main.xml will look as shown below. For this layout add the required images in the Drawable folder.

4.Now you can Run and test your application on any Android device.

Download Source code

Comments

comments

  1. v0v0 ka says

    useless POS!

  2. Fernando says

    Topic Badges: Does anyone have a more advanced tutorial on this topic? I found this … but I do not know how to implement it in my work.
    I want to show unread messages. I understand that it has to do with whether I read them or not … and that implies modifying a field in the database … my app raises the information from a json … Do you have any more advanced tutorial that explains this topic?

    I have a recyclerView and I want to show who from the users sent me a message …

Leave A Reply

Your email address will not be published.