Skip to content

Commit

Permalink
Merge branch 'release/v3.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Aug 21, 2016
2 parents 2a6b9a2 + b5264bb commit 2fd0946
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 44 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ The ActionItemBadge Library is pushed to [Maven Central], so you just need to ad

```javascript
dependencies {
compile 'com.mikepenz:actionitembadge:3.2.6@aar'
compile 'com.mikepenz:actionitembadge:3.3.0@aar'

//SUB-DEPENDENCIES
//Android-Iconics - used to provide an easy API for icons
compile 'com.mikepenz:iconics-core:2.6.6@aar'
compile 'com.mikepenz:iconics-core:2.8.0@aar'
}
```

Expand Down
16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 24
versionCode 326
versionName "3.2.6"
versionCode 330
versionName "3.3.0"
}
buildTypes {
release {
Expand All @@ -30,29 +30,29 @@ dependencies {
// contains util classes to support various android versions, and clean up code
// comes with the awesome "Holder"-Pattern
// https://github.com/mikepenz/Materialize
compile 'com.mikepenz:materialize:0.9.0@aar'
compile 'com.mikepenz:materialize:1.0.0@aar'

// used to fill the RecyclerView with the DrawerItems
// and provides single and multi selection, expandable items
// https://github.com/mikepenz/FastAdapter
compile 'com.mikepenz:fastadapter:1.5.8@aar'
compile 'com.mikepenz:fastadapter:1.7.0@aar'

// used to provide out of the box icon font support. simplifies development,
// and provides scalable icons. the core is very very light
// https://github.com/mikepenz/Android-Iconics
compile 'com.mikepenz:iconics-core:2.6.6@aar'
compile 'com.mikepenz:iconics-core:2.8.0@aar'

//used to generate the drawer on the left
//https://github.com/mikepenz/MaterialDrawer
compile 'com.mikepenz:materialdrawer:5.3.2@aar'
compile 'com.mikepenz:materialdrawer:5.5.0@aar'

//used to generate the Open Source section
//https://github.com/mikepenz/AboutLibraries
compile 'com.mikepenz:aboutlibraries:5.7.0@aar'
compile 'com.mikepenz:aboutlibraries:5.8.0@aar'

//used to display the icons in the drawer and in the menu
//https://github.com/mikepenz/Android-Iconics
compile 'com.mikepenz:google-material-typeface:2.2.0.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
compile 'com.mikepenz:crossfader:1.3.7@aar'
compile 'com.mikepenz:crossfader:1.5.0@aar'
}
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ buildscript {

ext {
compileSdkVersion = 24
buildToolsVersion = "24.0.0"
supportLibVersion = "24.0.0"
buildToolsVersion = "24.0.1"
supportLibVersion = "24.2.0"
}

allprojects {
Expand All @@ -23,5 +23,5 @@ allprojects {
}

task wrapper(type: Wrapper) {
gradleVersion = '2.13'
gradleVersion = '2.14'
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
VERSION_NAME=3.2.6
VERSION_CODE=326
VERSION_NAME=3.3.0
VERSION_CODE=330
GROUP=com.mikepenz
POM_DESCRIPTION=Android-ActionItemBadge Library
POM_URL=https://github.com/mikepenz/Android-ActionItemBadge
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri May 13 16:08:39 CEST 2016
#Sun Aug 21 20:02:02 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip
8 changes: 5 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 24
versionCode 326
versionName "3.2.6"
versionCode 330
versionName "3.3.0"
}
buildTypes {
release {
Expand All @@ -25,7 +25,9 @@ dependencies {
// used to provide out of the box icon font support. simplifies development,
// and provides scalable icons. the core is very very light
// https://github.com/mikepenz/Android-Iconics
compile 'com.mikepenz:iconics-core:2.6.6@aar'
compile 'com.mikepenz:iconics-core:2.8.0@aar'

compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

// used to provide useful AS warnings
compile "com.android.support:support-annotations:${rootProject.ext.supportLibVersion}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.StateListDrawable;
import android.support.annotation.ColorInt;
import android.support.v4.content.ContextCompat;
import android.util.StateSet;

import com.mikepenz.actionitembadge.library.R;
Expand Down Expand Up @@ -49,7 +50,7 @@ public BadgeDrawableBuilder strokeColor(@ColorInt int strokeColor) {
public StateListDrawable build(Context ctx) {
StateListDrawable stateListDrawable = new StateListDrawable();

GradientDrawable normal = (GradientDrawable) UIUtil.getCompatDrawable(ctx, R.drawable.action_item_badge);
GradientDrawable normal = (GradientDrawable) ContextCompat.getDrawable(ctx, R.drawable.action_item_badge);
GradientDrawable selected = (GradientDrawable) normal.getConstantState().newDrawable().mutate();

normal.setColor(mColor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.view.View;

import static android.util.TypedValue.COMPLEX_UNIT_DIP;
Expand All @@ -30,27 +29,6 @@ public static void setBackground(View v, Drawable d) {
}


/**
* helper method to get the drawable by its resource. specific to the correct android version
*
* @param c
* @param drawableRes
* @return
*/
public static Drawable getCompatDrawable(Context c, int drawableRes) {
Drawable d = null;
try {
if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
d = c.getResources().getDrawable(drawableRes);
} else {
d = c.getResources().getDrawable(drawableRes, c.getTheme());
}
} catch (Exception ex) {
}
return d;
}


public static int convertDpToPx(Context context, float dp) {
return (int) applyDimension(COMPLEX_UNIT_DIP, dp, context.getResources().getDisplayMetrics());
}
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/res/values/aboutlibraries.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Android-<b>ActionItemBadge</b> is a library which offers a simple and easy to use method to add a badge to your action item!!
]]>
</string>
<string name="library_AndroidActionItemBadge_libraryVersion">3.2.6</string>
<string name="library_AndroidActionItemBadge_libraryVersion">3.3.0</string>
<string name="library_AndroidActionItemBadge_libraryWebsite">https://github.com/mikepenz/Android-ActionItemBadge</string>
<string name="library_AndroidActionItemBadge_licenseId">apache_2_0</string>
<string name="library_AndroidActionItemBadge_isOpenSource">true</string>
Expand Down

0 comments on commit 2fd0946

Please sign in to comment.