Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jgilfelt/android-viewbadger
[DEPRECATED] A simple way to "badge" any given Android view at runtime without having to cater for it in layout
https://github.com/jgilfelt/android-viewbadger
Last synced: 28 days ago
JSON representation
[DEPRECATED] A simple way to "badge" any given Android view at runtime without having to cater for it in layout
- Host: GitHub
- URL: https://github.com/jgilfelt/android-viewbadger
- Owner: jgilfelt
- License: apache-2.0
- Created: 2011-09-27T22:50:57.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-08-28T07:48:08.000Z (about 9 years ago)
- Last Synced: 2024-10-01T17:42:37.239Z (about 1 month ago)
- Language: Java
- Homepage:
- Size: 290 KB
- Stars: 3,016
- Watchers: 219
- Forks: 1,032
- Open Issues: 17
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
- awesome - android-viewbadger - [DEPRECATED] A simple way to "badge" any given Android view at runtime without having to cater for it in layout (etc)
- awesome - android-viewbadger - [DEPRECATED] A simple way to "badge" any given Android view at runtime without having to cater for it in layout (etc)
README
Android ViewBadger
==================A simple way to "badge" any given Android view at runtime without having to cater for it in layout.
![Demos](http://www.jeffgilfelt.com/viewbadger/vb-1a.png "Demos")
![ListAdapter](http://www.jeffgilfelt.com/viewbadger/vb-2a.png "ListAdapter")Note: If your aim is to replicate the iOS icon and TabBar badge UI for notifications, consider using Android UI conventions such as the number field of the [Notification](http://developer.android.com/reference/android/app/Notification.html "Notification") class rather than this method.
Usage
-----Simple example:
View target = findViewById(R.id.target_view);
BadgeView badge = new BadgeView(this, target);
badge.setText("1");
badge.show();This project contains a fully working example application. Refer to the `DemoActivity` class for more custom badge examples, including custom backgrounds and animations. `BadgeView` is a subclass of `TextView` so you can use all of `TextView`'s methods to style the appearance of your badge.
To use ViewBadger in your own Android project, simply copy `android-viewbadger.jar` (available from this repository's package downloads) into your project's `/libs` directory and add it to the build path.
Current Limitations
-------------------- Badging Action Bar items is currently not supported [#2](https://github.com/jgilfelt/android-viewbadger/issues/2)
- Badging views inside RelativeLayout with dependencies may break alignment [#1](https://github.com/jgilfelt/android-viewbadger/issues/1)Credits
-------Author: Jeff Gilfelt
The code in this project is licensed under the Apache Software License 2.0.
Copyright (c) 2011 readyState Software Ltd.