Вопрос

Does anyone have an idea of how the message button, notifies and updates us on the top corner how many unread messages are there and how do you do it. Thanks in advance this is a sample picture of what i want,

enter image description here

And this a sample usual xml code for a button in android,

 <Button
        android:id="@+id/bAddRec"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center"
        android:text="@string/add" />

And I hope that your answers will be useful to others as well :)

Это было полезно?

Решение

take a look at this ViewBager lib..it will help you

In this yourView is placed in framelayout with top right cornor badge indicating unread msg or count or any thing....

ViewBager liberary

Другие советы

Android doesn't support this kind of practice because it has notification bar for this kind of purpose. But if you need it really bad then, you Samsung and Sony Xperia provides you with a way to do it.

This might be helpfulto you : How to display count of notifications in app launcher icon

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top