Giter Site home page Giter Site logo

luongvo / materialbadgetextview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matrixxun/materialbadgetextview

1.0 1.0 0.0 2.2 MB

As the name describes, this is an Android library that you can use to show new messages badge and new features badge.

Java 100.00%

materialbadgetextview's Introduction

Android Arsenal

MaterialBadgeTextView

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.

Features

  1. Material Design style - it provides a default shadow like FAB(Floating Action Bar)
  2. Easy to use - you can just use it as a normal TextView
  3. Really Lite - only ONE java class, no resource file
  4. Support MenuAction in Toolbar

If you use mac OS X, you must have seen this image:

Demo Screen Capture

Usage

Code Badge
setBadgeCount(0,true) the TextView is blank
setBadgeCount(0,false) badge_0
setBadgeCount(3) number
setBadgeCount(68) two
setBadgeCount(101) two
setBadgeCount(99999) two
setHighLightMode() two
setText("") the TextView is blank
setText("Hello World!") two
setText("10999999976") two

Compat

API level 9+ supported

Example

See example code here on Github. You can also see it live downloading this apk

License

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.

materialbadgetextview's People

Contributors

matrixxun avatar luongvo avatar ivantretyak avatar jeremy-techson avatar

Stargazers

Chayan Mistry avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.