diff --git a/README.md b/README.md index c5c3e58..93df28f 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ buildscript { } dependencies { - compile 'com.github.aakira:compound-icon-textview:1.1.0@aar' + compile 'com.github.aakira:compound-icon-textview:1.2.0@aar' } ``` ## Using libraries diff --git a/compoundicontextview/src/main/java/com/github/aakira/compoundicontextview/CompoundIconTextView.java b/compoundicontextview/src/main/java/com/github/aakira/compoundicontextview/CompoundIconTextView.java index fd61098..bbb09f2 100644 --- a/compoundicontextview/src/main/java/com/github/aakira/compoundicontextview/CompoundIconTextView.java +++ b/compoundicontextview/src/main/java/com/github/aakira/compoundicontextview/CompoundIconTextView.java @@ -258,8 +258,10 @@ private Drawable resource2VectorDrawable(@DrawableRes final int resourceId, @Col // See if we need to 'fix' the drawableLeft fixDrawable(drawable); // Set color - DrawableCompat.setTint(drawable, iconColor); - DrawableCompat.setTintMode(drawable, PorterDuff.Mode.SRC_IN); + if(iconColor != UNDEFINED_RESOURCE) { + DrawableCompat.setTint(drawable, iconColor); + DrawableCompat.setTintMode(drawable, PorterDuff.Mode.SRC_IN); + } // Resize Bitmap return new BitmapDrawable(context.getResources(), Bitmap.createScaledBitmap(drawable2Bitmap(drawable, iconWidth, iconHeight), iconWidth, iconHeight, true)); diff --git a/gradle.properties b/gradle.properties index c66a218..15b0efb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,8 +19,8 @@ org.gradle.jvmargs=-Xmx1536m # This library version -LIBRARY_VERSION_CODE=2 -LIBRARY_VERSION_NAME=1.1.0 +LIBRARY_VERSION_CODE=3 +LIBRARY_VERSION_NAME=1.2.0 # App information