As the name describes, this is an Android library that you can use to show new messages badge and new features badge.
As the name describes, This “MaterialBadgeTextView” is an Android library that provides a reformed textview for Badge. A Badge is a colored circle with an inserted number which are displayed at the top-right conner of the icons, it often plays a role of showing new messages or new features in IM apps such as Facebook Messager, WhatsApp, WeChat, and forth.
If you use mac OS X, you must have seen this image:
Code | Badge |
---|---|
setBadgeCount(0,true) |
the TextView is blank |
setBadgeCount(0,false) |
|
setBadgeCount(3) |
|
setBadgeCount(68) |
|
setBadgeCount(101) |
|
setBadgeCount(99999) |
|
setHighLightMode() |
|
setText("") |
the TextView is blank |
setText("Hello World!") |
|
setText("10999999976") |
API level 9+ supported
See example code here on Github. You can also see it live downloading this apk
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.