Skip to content

Commit

Permalink
Merge pull request #7 from AAkira/fix/overwrite-icon-color
Browse files Browse the repository at this point in the history
Fix overwrite icon color
  • Loading branch information
AAkira authored Nov 13, 2017
2 parents 05d5c4a + 81fa20e commit 041fa58
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 041fa58

Please sign in to comment.