-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
47 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
#Android-ActionItemBadge [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.mikepenz/actionitembadge/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.mikepenz/actionitembadge) [![Android Arsenal](http://img.shields.io/badge/Android%20Arsenal-Android--ActionItemBadge-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/755) | ||
# Android-ActionItemBadge [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.mikepenz/actionitembadge/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.mikepenz/actionitembadge) [![Android Arsenal](http://img.shields.io/badge/Android%20Arsenal-Android--ActionItemBadge-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/755) | ||
|
||
[![Join the chat at https://gitter.im/mikepenz/Android-ActionItemBadge](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mikepenz/Android-ActionItemBadge?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
|
||
ActionItemBadge is a library which offers a simple and easy to use method to add a badge to your action item! | ||
|
||
##Screenshots | ||
## Screenshots | ||
![Image](https://raw.githubusercontent.com/mikepenz/Android-ActionItemBadge/develop/DEV/screenshot/screenshot1_small.png) | ||
![Image](https://raw.githubusercontent.com/mikepenz/Android-ActionItemBadge/develop/DEV/screenshot/screenshot2_small.png) | ||
|
||
##Include in your project | ||
###Using Maven | ||
## Include in your project | ||
### Using Maven | ||
The ActionItemBadge Library is pushed to [Maven Central], so you just need to add the following dependency to your `build.gradle`. | ||
|
||
```javascript | ||
dependencies { | ||
compile 'com.mikepenz:actionitembadge:3.3.1@aar' | ||
implementation 'com.mikepenz:actionitembadge:3.3.2@aar' | ||
|
||
//SUB-DEPENDENCIES | ||
//Android-Iconics - used to provide an easy API for icons | ||
compile 'com.mikepenz:iconics-core:2.8.1@aar' | ||
implementation 'com.mikepenz:iconics-core:{latestVersion}@aar' | ||
|
||
//appcompat | ||
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" | ||
implementation "com.android.support:appcompat-v7:${supportLibVersion}" | ||
} | ||
``` | ||
|
||
###Additional dependency for the icon font | ||
### Additional dependency for the icon font | ||
If you are going to use the icon font you will have to add additional dependency for the font. | ||
You can find all available addons here: https://github.com/mikepenz/Android-Iconics#2-choose-your-desired-fonts | ||
|
||
##UPGRADE NOTES | ||
####< 3.0.0 | ||
## UPGRADE NOTES | ||
#### < 3.0.0 | ||
- If you come from a version prior 3.0.0 you will have to rename some classes, and the default styles also found a new place. Just check out the updated sample app for all the changes. | ||
|
||
##Usage | ||
###menu.xml | ||
## Usage | ||
### menu.xml | ||
Create your menu.xml as you would do normally and add the app:actionLayout param. | ||
It is also a good idea to set showAsAction="always" (The badge can only be shown in the actionbar) | ||
```xml | ||
|
@@ -48,7 +48,7 @@ It is also a good idea to set showAsAction="always" (The badge can only be shown | |
android:title="@string/sample_1"/> | ||
</menu> | ||
``` | ||
###Activity | ||
### Activity | ||
Override the onCreateOptionsMenu method | ||
```java | ||
@Override | ||
|
@@ -87,19 +87,19 @@ call invalidateOptionsMenu() afterwards. | |
} | ||
``` | ||
|
||
#Dependencies | ||
# Dependencies | ||
* Android-Iconics - https://github.com/mikepenz/Android-Iconics | ||
|
||
|
||
#Developed By | ||
# Developed By | ||
|
||
* Mike Penz | ||
* [mikepenz.com](http://mikepenz.com) - <[email protected]> | ||
* [paypal.me/mikepenz](http://paypal.me/mikepenz) | ||
|
||
#License | ||
# License | ||
|
||
Copyright 2016 Mike Penz | ||
Copyright 2017 Mike Penz | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
buildscript { | ||
repositories { | ||
google() | ||
jcenter() | ||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:2.3.0-beta1' | ||
classpath 'com.novoda:bintray-release:0.3.4' | ||
classpath 'com.android.tools.build:gradle:3.0.0' | ||
classpath 'com.novoda:bintray-release:0.5.0' | ||
} | ||
} | ||
|
||
ext { | ||
compileSdkVersion = 25 | ||
buildToolsVersion = "25.0.2" | ||
supportLibVersion = "25.1.0" | ||
compileSdkVersion = 27 | ||
buildToolsVersion = "27.0.0" | ||
supportLibVersion = "27.0.0" | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
jcenter() | ||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } | ||
} | ||
} | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '3.2' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Tue Dec 27 09:05:09 CET 2016 | ||
#Sat Oct 28 18:55:50 CEST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters