From 6882bfc22cb5c2358acf3bf730890db0ae346022 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 20 Sep 2015 16:47:53 +0200 Subject: [PATCH 01/58] Prepare for next release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a5f4bdd..b283d0b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.0.0 +VERSION_NAME=2.0.1-SNAPSHOT GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From 6caafd60c71f885cd2c58c08e9063591bab2c77a Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 20 Sep 2015 17:29:43 +0200 Subject: [PATCH 02/58] Add license header --- .../circleimageview/CircleImageView.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index ce6cdaa..782c34a 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 - 2015 Henning Dodenhof + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package de.hdodenhof.circleimageview; import android.content.Context; From 4160c751d50fbfc247fbc877319da3042504824e Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sat, 30 Jan 2016 12:23:47 +0100 Subject: [PATCH 03/58] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef73b18..c7431eb 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Limitations ----------- * The ScaleType is always CENTER_CROP and you'll get an exception if you try to change it. This is (currently) by design as it's perfectly fine for profile images. * Enabling `adjustViewBounds` is not supported as this requires an unsupported ScaleType -* If you use Picasso for fetching images, you need to set the `noFade()` option to avoid messed up images. If you want to keep the fadeIn animation, you have to fetch the image into a `Target` and apply a custom animation when setting it as source for the `CircleImageView` in `onBitmapLoaded()`. +* If you use an image loading library like Picasso or Glide, you need to disable their fade animations to avoid messed up images. For Picasso use the `noFade()` option, for Glide use `dontAnimate()`. If you want to keep the fadeIn animation, you have to fetch the image into a `Target` and apply a custom animation yourself when receiving the `Bitmap`. * Using a `TransitionDrawable` with `CircleImageView` doesn't work properly and leads to messed up images. Changelog From dd083c7e1157897e46d90c475013e3f8d983d1be Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sat, 30 Jan 2016 13:10:54 +0100 Subject: [PATCH 04/58] Update all the dependencies --- build.gradle | 2 +- circleimageview/build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 3 +-- sample/build.gradle | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index bba8759..ec1c36d 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:1.5.0' } } diff --git a/circleimageview/build.gradle b/circleimageview/build.gradle index a5f339f..ea9b66b 100644 --- a/circleimageview/build.gradle +++ b/circleimageview/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion 23 - buildToolsVersion '23.0.1' + buildToolsVersion '23.0.2' defaultConfig { minSdkVersion 8 @@ -11,7 +11,7 @@ android { } dependencies { - provided 'com.android.support:support-annotations:23.0.1' + provided 'com.android.support:support-annotations:23.1.1' } apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 60918fd..9851e51 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Jan 14 11:00:43 CET 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip diff --git a/sample/build.gradle b/sample/build.gradle index 27025e1..b5d8d9a 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 23 - buildToolsVersion '23.0.1' + buildToolsVersion '23.0.2' defaultConfig { minSdkVersion 8 From aedcf629aa7481e245337988e6744fc05de46a8d Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 17 Apr 2016 13:06:59 +0200 Subject: [PATCH 05/58] Update gradle plugin and build tools to latest versions --- build.gradle | 2 +- sample/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index ec1c36d..18108df 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:1.5.0' + classpath 'com.android.tools.build:gradle:2.0.0' } } diff --git a/sample/build.gradle b/sample/build.gradle index b5d8d9a..781c824 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 23 - buildToolsVersion '23.0.2' + buildToolsVersion '23.0.3' defaultConfig { minSdkVersion 8 From 3d8ea5c80684f92394b6d906061b72ae55b34693 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 17 Apr 2016 13:22:07 +0200 Subject: [PATCH 06/58] Fix NPE caused by tint attribute on api levels < 21; #105 --- .../de/hdodenhof/circleimageview/CircleImageView.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 782c34a..8e1e0b2 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -246,10 +246,16 @@ public void setColorFilter(ColorFilter cf) { } mColorFilter = cf; - mBitmapPaint.setColorFilter(mColorFilter); + applyColorFilter(); invalidate(); } + private void applyColorFilter() { + if (mBitmapPaint != null) { + mBitmapPaint.setColorFilter(mColorFilter); + } + } + private Bitmap getBitmapFromDrawable(Drawable drawable) { if (drawable == null) { return null; @@ -319,6 +325,7 @@ private void setup() { } mDrawableRadius = Math.min(mDrawableRect.height() / 2.0f, mDrawableRect.width() / 2.0f); + applyColorFilter(); updateShaderMatrix(); invalidate(); } From a50a1c1de770a110f2bf7583269e959f3fbdbe9f Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 25 Apr 2016 11:18:03 +0200 Subject: [PATCH 07/58] Add missing getter for color filter --- .../java/de/hdodenhof/circleimageview/CircleImageView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 8e1e0b2..5e011ef 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -250,6 +250,11 @@ public void setColorFilter(ColorFilter cf) { invalidate(); } + @Override + public ColorFilter getColorFilter() { + return mColorFilter; + } + private void applyColorFilter() { if (mBitmapPaint != null) { mBitmapPaint.setColorFilter(mColorFilter); From ec75ff77607c5a5f340141bc3bcae662f1a68d80 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Fri, 29 Apr 2016 17:31:15 +0200 Subject: [PATCH 08/58] Update gradle plugin, build tools and support lib to latest versions --- build.gradle | 2 +- circleimageview/build.gradle | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 18108df..fb07616 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.0.0' + classpath 'com.android.tools.build:gradle:2.1.0' } } diff --git a/circleimageview/build.gradle b/circleimageview/build.gradle index ea9b66b..a83a99c 100644 --- a/circleimageview/build.gradle +++ b/circleimageview/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion 23 - buildToolsVersion '23.0.2' + buildToolsVersion '23.0.3' defaultConfig { minSdkVersion 8 @@ -11,7 +11,7 @@ android { } dependencies { - provided 'com.android.support:support-annotations:23.1.1' + provided 'com.android.support:support-annotations:23.3.0' } apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' \ No newline at end of file From af3982c2acf94b150cd1eaf7720d14476f6f167d Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Fri, 29 Apr 2016 17:46:19 +0200 Subject: [PATCH 09/58] Add option to disable circular transformation; #111 --- .../circleimageview/CircleImageView.java | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 5e011ef..24b08ff 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -73,6 +73,7 @@ public class CircleImageView extends ImageView { private boolean mReady; private boolean mSetupPending; private boolean mBorderOverlay; + private boolean mDisableCircularTransformation; public CircleImageView(Context context) { super(context); @@ -130,6 +131,11 @@ public void setAdjustViewBounds(boolean adjustViewBounds) { @Override protected void onDraw(Canvas canvas) { + if (mDisableCircularTransformation) { + super.onDraw(canvas); + return; + } + if (mBitmap == null) { return; } @@ -211,32 +217,41 @@ public void setBorderOverlay(boolean borderOverlay) { setup(); } + public boolean isDisableCircularTransformation() { + return mDisableCircularTransformation; + } + + public void setDisableCircularTransformation(boolean disableCircularTransformation) { + if (mDisableCircularTransformation == disableCircularTransformation) { + return; + } + + mDisableCircularTransformation = disableCircularTransformation; + initializeBitmap(); + } + @Override public void setImageBitmap(Bitmap bm) { super.setImageBitmap(bm); - mBitmap = bm; - setup(); + initializeBitmap(); } @Override public void setImageDrawable(Drawable drawable) { super.setImageDrawable(drawable); - mBitmap = getBitmapFromDrawable(drawable); - setup(); + initializeBitmap(); } @Override public void setImageResource(@DrawableRes int resId) { super.setImageResource(resId); - mBitmap = getBitmapFromDrawable(getDrawable()); - setup(); + initializeBitmap(); } @Override public void setImageURI(Uri uri) { super.setImageURI(uri); - mBitmap = uri != null ? getBitmapFromDrawable(getDrawable()) : null; - setup(); + initializeBitmap(); } @Override @@ -289,6 +304,15 @@ private Bitmap getBitmapFromDrawable(Drawable drawable) { } } + private void initializeBitmap() { + if (mDisableCircularTransformation) { + mBitmap = null; + } else { + mBitmap = getBitmapFromDrawable(getDrawable()); + } + setup(); + } + private void setup() { if (!mReady) { mSetupPending = true; From d3ced7d5e3a2651e3b1a1afa1b0723cf7b855166 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Fri, 29 Apr 2016 19:05:18 +0200 Subject: [PATCH 10/58] Add support for padding --- .../circleimageview/CircleImageView.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 24b08ff..4fb1769 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -141,11 +141,11 @@ protected void onDraw(Canvas canvas) { } if (mFillColor != Color.TRANSPARENT) { - canvas.drawCircle(getWidth() / 2.0f, getHeight() / 2.0f, mDrawableRadius, mFillPaint); + canvas.drawCircle(mDrawableRect.centerX(), mDrawableRect.centerY(), mDrawableRadius, mFillPaint); } - canvas.drawCircle(getWidth() / 2.0f, getHeight() / 2.0f, mDrawableRadius, mBitmapPaint); + canvas.drawCircle(mDrawableRect.centerX(), mDrawableRect.centerY(), mDrawableRadius, mBitmapPaint); if (mBorderWidth != 0) { - canvas.drawCircle(getWidth() / 2.0f, getHeight() / 2.0f, mBorderRadius, mBorderPaint); + canvas.drawCircle(mBorderRect.centerX(), mBorderRect.centerY(), mBorderRadius, mBorderPaint); } } @@ -345,7 +345,7 @@ private void setup() { mBitmapHeight = mBitmap.getHeight(); mBitmapWidth = mBitmap.getWidth(); - mBorderRect.set(0, 0, getWidth(), getHeight()); + mBorderRect.set(calculateBounds()); mBorderRadius = Math.min((mBorderRect.height() - mBorderWidth) / 2.0f, (mBorderRect.width() - mBorderWidth) / 2.0f); mDrawableRect.set(mBorderRect); @@ -359,6 +359,18 @@ private void setup() { invalidate(); } + private RectF calculateBounds() { + int availableWidth = getWidth() - getPaddingLeft() - getPaddingRight(); + int availableHeight = getHeight() - getPaddingTop() - getPaddingBottom(); + + int sideLength = Math.min(availableWidth, availableHeight); + + float left = getPaddingLeft() + (availableWidth - sideLength) / 2f; + float top = getPaddingTop() + (availableHeight - sideLength) / 2f; + + return new RectF(left, top, left + sideLength, top + sideLength); + } + private void updateShaderMatrix() { float scale; float dx = 0; From 661381f39b72aba22ce7bd9d71ee523e4fcf7c77 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 1 May 2016 17:51:38 +0200 Subject: [PATCH 11/58] Next version is 2.1.0 --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index b283d0b..ee3a16c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.0.1-SNAPSHOT +VERSION_NAME=2.1.0-SNAPSHOT GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android @@ -10,4 +10,4 @@ POM_LICENCE_NAME=The Apache Software License, Version 2.0 POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt POM_LICENCE_DIST=repo POM_DEVELOPER_ID=hdodenhof -POM_DEVELOPER_NAME=Henning Dodenhof \ No newline at end of file +POM_DEVELOPER_NAME=Henning Dodenhof From 3e607323d01e21e5c063b03708802a9aad2a01e4 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 16 May 2016 15:31:48 +0200 Subject: [PATCH 12/58] Deprecate fillColor and add some Javadoc explaining the current behaviour --- .../circleimageview/CircleImageView.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 4fb1769..cd99973 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -173,10 +173,27 @@ public void setBorderColorResource(@ColorRes int borderColorRes) { setBorderColor(getContext().getResources().getColor(borderColorRes)); } + /** + * Return the color drawn behind the circle-shaped drawable. + * + * @return The color drawn behind the drawable + * + * @deprecated Fill color support is going to be removed in the future + */ + @Deprecated public int getFillColor() { return mFillColor; } + /** + * Set a color to be drawn behind the circle-shaped drawable. Note that + * this has no effect if the drawable is opaque or no drawable is set. + * + * @param fillColor The color to be drawn behind the drawable + * + * @deprecated Fill color support is going to be removed in the future + */ + @Deprecated public void setFillColor(@ColorInt int fillColor) { if (fillColor == mFillColor) { return; @@ -187,6 +204,16 @@ public void setFillColor(@ColorInt int fillColor) { invalidate(); } + /** + * Set a color to be drawn behind the circle-shaped drawable. Note that + * this has no effect if the drawable is opaque or no drawable is set. + * + * @param fillColorRes The color resource to be resolved to a color and + * drawn behind the drawable + * + * @deprecated Fill color support is going to be removed in the future + */ + @Deprecated public void setFillColorResource(@ColorRes int fillColorRes) { setFillColor(getContext().getResources().getColor(fillColorRes)); } From d2cc96be774516b0d6711df4f7390d4b063298a0 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 16 May 2016 16:12:30 +0200 Subject: [PATCH 13/58] Deprecate setBorderColorResource --- .../java/de/hdodenhof/circleimageview/CircleImageView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index cd99973..03f0ae8 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -169,6 +169,10 @@ public void setBorderColor(@ColorInt int borderColor) { invalidate(); } + /** + * @deprecated Use {@link #setBorderColor(int)} instead + */ + @Deprecated public void setBorderColorResource(@ColorRes int borderColorRes) { setBorderColor(getContext().getResources().getColor(borderColorRes)); } From 7b9e2fc8b0061273a47e2b9166b3661a40a78cd4 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 16 May 2016 17:20:04 +0200 Subject: [PATCH 14/58] Let border overlap image by 1px to avoid a hairline gap caused by antialising; resolves #131 --- .../java/de/hdodenhof/circleimageview/CircleImageView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 03f0ae8..3216c16 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -380,8 +380,8 @@ private void setup() { mBorderRadius = Math.min((mBorderRect.height() - mBorderWidth) / 2.0f, (mBorderRect.width() - mBorderWidth) / 2.0f); mDrawableRect.set(mBorderRect); - if (!mBorderOverlay) { - mDrawableRect.inset(mBorderWidth, mBorderWidth); + if (!mBorderOverlay && mBorderWidth > 0) { + mDrawableRect.inset(mBorderWidth - 1.0f, mBorderWidth - 1.0f); } mDrawableRadius = Math.min(mDrawableRect.height() / 2.0f, mDrawableRect.width() / 2.0f); From f98b11c3867b5ad28b66717e6149fe4e86fe6f8b Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 16 May 2016 17:23:35 +0200 Subject: [PATCH 15/58] Tweak border drawing condition --- .../main/java/de/hdodenhof/circleimageview/CircleImageView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 3216c16..39cf234 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -144,7 +144,7 @@ protected void onDraw(Canvas canvas) { canvas.drawCircle(mDrawableRect.centerX(), mDrawableRect.centerY(), mDrawableRadius, mFillPaint); } canvas.drawCircle(mDrawableRect.centerX(), mDrawableRect.centerY(), mDrawableRadius, mBitmapPaint); - if (mBorderWidth != 0) { + if (mBorderWidth > 0) { canvas.drawCircle(mBorderRect.centerX(), mBorderRect.centerY(), mBorderRadius, mBorderPaint); } } From b9db84fbfa62ec65d403ebd8456ed8c129b11d7e Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 3 Jul 2016 18:46:13 +0200 Subject: [PATCH 16/58] Handle programmatic change of padding properly --- .../hdodenhof/circleimageview/CircleImageView.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 39cf234..e2a87ee 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -155,6 +155,18 @@ protected void onSizeChanged(int w, int h, int oldw, int oldh) { setup(); } + @Override + public void setPadding(int left, int top, int right, int bottom) { + super.setPadding(left, top, right, bottom); + setup(); + } + + @Override + public void setPaddingRelative(int start, int top, int end, int bottom) { + super.setPaddingRelative(start, top, end, bottom); + setup(); + } + public int getBorderColor() { return mBorderColor; } From 354575cc3cf92dbe22084ad66abdf8894afc7825 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 3 Jul 2016 18:47:24 +0200 Subject: [PATCH 17/58] Update copyright date range --- README.md | 2 +- .../main/java/de/hdodenhof/circleimageview/CircleImageView.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c7431eb..f32b813 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Changelog License ------- - Copyright 2014 - 2015 Henning Dodenhof + Copyright 2014 - 2016 Henning Dodenhof Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index e2a87ee..f1927ff 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 - 2015 Henning Dodenhof + * Copyright 2014 - 2016 Henning Dodenhof * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 5186ac1b0a3f24ac65376b3c0a90ee01549201cb Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 3 Jul 2016 18:58:44 +0200 Subject: [PATCH 18/58] Prepare release v2.1.0 --- README.md | 8 +++++++- gradle.properties | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f32b813..5a0f2a7 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Gradle ``` dependencies { ... - compile 'de.hdodenhof:circleimageview:2.0.0' + compile 'de.hdodenhof:circleimageview:2.1.0' } ``` @@ -43,6 +43,12 @@ Limitations Changelog --------- +* **2.1.0** + * Add support for padding + * Add option to disable circular transformation + * Fix hairline gap being drawn between image and border under some conditions + * Fix NPE when using tint attribute (which is not supported) + * Deprecate fill color as it seems to cause quite some confusion * **2.0.0** * BREAKING: Custom xml attributes are now prefixed with "civ_" * Graceful handling of incompatible drawables diff --git a/gradle.properties b/gradle.properties index ee3a16c..1c6e5bb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.1.0-SNAPSHOT +VERSION_NAME=2.1.0 GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From 86560980639500ae54361a9d5e582d8ee24214b6 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 3 Jul 2016 19:18:19 +0200 Subject: [PATCH 19/58] Prepare for next release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1c6e5bb..b2f138e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.1.0 +VERSION_NAME=2.1.1-SNAPSHOT GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From d67ba43fa47ff30fee581e95614a61c4b1d55ceb Mon Sep 17 00:00:00 2001 From: Lucas Candalo Date: Mon, 16 Jan 2017 15:22:31 -0200 Subject: [PATCH 20/58] Update copyright date range Signed-off-by: Lucas Candalo --- README.md | 2 +- .../main/java/de/hdodenhof/circleimageview/CircleImageView.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a0f2a7..66c61e5 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ Changelog License ------- - Copyright 2014 - 2016 Henning Dodenhof + Copyright 2014 - 2017 Henning Dodenhof Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index f1927ff..3612019 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 - 2016 Henning Dodenhof + * Copyright 2014 - 2017 Henning Dodenhof * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 7fd3573507e345da6d7a295c763f55afc852b481 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 12 Mar 2017 16:43:20 +0100 Subject: [PATCH 21/58] Update all the dependencies --- build.gradle | 2 +- circleimageview/build.gradle | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 3 ++- sample/build.gradle | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index fb07616..0386312 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:2.3.0' } } diff --git a/circleimageview/build.gradle b/circleimageview/build.gradle index a83a99c..a2f2dea 100644 --- a/circleimageview/build.gradle +++ b/circleimageview/build.gradle @@ -1,17 +1,17 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 23 - buildToolsVersion '23.0.3' + compileSdkVersion 25 + buildToolsVersion '25.0.2' defaultConfig { minSdkVersion 8 - targetSdkVersion 23 + targetSdkVersion 25 } } dependencies { - provided 'com.android.support:support-annotations:23.3.0' + provided 'com.android.support:support-annotations:25.2.0' } apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9851e51..4bbe3b7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Sun Mar 12 16:31:51 CET 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/sample/build.gradle b/sample/build.gradle index 781c824..8751439 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 23 - buildToolsVersion '23.0.3' + compileSdkVersion 25 + buildToolsVersion '25.0.2' defaultConfig { minSdkVersion 8 - targetSdkVersion 23 + targetSdkVersion 25 } } From f6c348c669e34b61b8c1cb8c0b8520cf6c37297c Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Fri, 29 Sep 2017 10:55:50 +0200 Subject: [PATCH 22/58] Bump targetSdk to 26; update build deps to latest versions --- build.gradle | 8 +++++--- circleimageview/build.gradle | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 4 ++-- sample/build.gradle | 6 +++--- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 0386312..5a64852 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,11 @@ buildscript { repositories { - mavenCentral() + jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.android.tools.build:gradle:3.0.0-beta6' } } @@ -13,6 +14,7 @@ allprojects { group = GROUP repositories { - mavenCentral() + jcenter() + google() } } \ No newline at end of file diff --git a/circleimageview/build.gradle b/circleimageview/build.gradle index a2f2dea..796806e 100644 --- a/circleimageview/build.gradle +++ b/circleimageview/build.gradle @@ -1,17 +1,17 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' + compileSdkVersion 26 + buildToolsVersion '26.0.1' defaultConfig { minSdkVersion 8 - targetSdkVersion 25 + targetSdkVersion 26 } } dependencies { - provided 'com.android.support:support-annotations:25.2.0' + provided 'com.android.support:support-annotations:26.1.0' } apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4bbe3b7..294a2c3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Mar 12 16:31:51 CET 2017 +#Fri Sep 29 10:49:45 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/sample/build.gradle b/sample/build.gradle index 8751439..01fc173 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' + compileSdkVersion 26 + buildToolsVersion '26.0.1' defaultConfig { minSdkVersion 8 - targetSdkVersion 25 + targetSdkVersion 26 } } From 8c7f69e88dbdb5d94ec16bf0edd30446584fa7e9 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Fri, 29 Apr 2016 17:46:19 +0200 Subject: [PATCH 23/58] Rename fillColor to circleBackgroundColor --- .../circleimageview/CircleImageView.java | 62 ++++++++++++------- circleimageview/src/main/res/values/attrs.xml | 2 + 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 3612019..ba8e0f8 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -45,7 +45,7 @@ public class CircleImageView extends ImageView { private static final int DEFAULT_BORDER_WIDTH = 0; private static final int DEFAULT_BORDER_COLOR = Color.BLACK; - private static final int DEFAULT_FILL_COLOR = Color.TRANSPARENT; + private static final int DEFAULT_CIRCLE_BACKGROUND_COLOR = Color.TRANSPARENT; private static final boolean DEFAULT_BORDER_OVERLAY = false; private final RectF mDrawableRect = new RectF(); @@ -54,11 +54,11 @@ public class CircleImageView extends ImageView { private final Matrix mShaderMatrix = new Matrix(); private final Paint mBitmapPaint = new Paint(); private final Paint mBorderPaint = new Paint(); - private final Paint mFillPaint = new Paint(); + private final Paint mCircleBackgroundPaint = new Paint(); private int mBorderColor = DEFAULT_BORDER_COLOR; private int mBorderWidth = DEFAULT_BORDER_WIDTH; - private int mFillColor = DEFAULT_FILL_COLOR; + private int mCircleBackgroundColor = DEFAULT_CIRCLE_BACKGROUND_COLOR; private Bitmap mBitmap; private BitmapShader mBitmapShader; @@ -93,7 +93,15 @@ public CircleImageView(Context context, AttributeSet attrs, int defStyle) { mBorderWidth = a.getDimensionPixelSize(R.styleable.CircleImageView_civ_border_width, DEFAULT_BORDER_WIDTH); mBorderColor = a.getColor(R.styleable.CircleImageView_civ_border_color, DEFAULT_BORDER_COLOR); mBorderOverlay = a.getBoolean(R.styleable.CircleImageView_civ_border_overlay, DEFAULT_BORDER_OVERLAY); - mFillColor = a.getColor(R.styleable.CircleImageView_civ_fill_color, DEFAULT_FILL_COLOR); + + // Look for deprecated civ_fill_color if civ_circle_background_color is not set + if (a.hasValue(R.styleable.CircleImageView_civ_circle_background_color)) { + mCircleBackgroundColor = a.getColor(R.styleable.CircleImageView_civ_circle_background_color, + DEFAULT_CIRCLE_BACKGROUND_COLOR); + } else if (a.hasValue(R.styleable.CircleImageView_civ_fill_color)) { + mCircleBackgroundColor = a.getColor(R.styleable.CircleImageView_civ_fill_color, + DEFAULT_CIRCLE_BACKGROUND_COLOR); + } a.recycle(); @@ -140,8 +148,8 @@ protected void onDraw(Canvas canvas) { return; } - if (mFillColor != Color.TRANSPARENT) { - canvas.drawCircle(mDrawableRect.centerX(), mDrawableRect.centerY(), mDrawableRadius, mFillPaint); + if (mCircleBackgroundColor != Color.TRANSPARENT) { + canvas.drawCircle(mDrawableRect.centerX(), mDrawableRect.centerY(), mDrawableRadius, mCircleBackgroundPaint); } canvas.drawCircle(mDrawableRect.centerX(), mDrawableRect.centerY(), mDrawableRadius, mBitmapPaint); if (mBorderWidth > 0) { @@ -189,16 +197,34 @@ public void setBorderColorResource(@ColorRes int borderColorRes) { setBorderColor(getContext().getResources().getColor(borderColorRes)); } + public int getCircleBackgroundColor() { + return mCircleBackgroundColor; + } + + public void setCircleBackgroundColor(@ColorInt int circleBackgroundColor) { + if (circleBackgroundColor == mCircleBackgroundColor) { + return; + } + + mCircleBackgroundColor = circleBackgroundColor; + mCircleBackgroundPaint.setColor(circleBackgroundColor); + invalidate(); + } + + public void setCircleBackgroundColorResource(@ColorRes int circleBackgroundRes) { + setCircleBackgroundColor(getContext().getResources().getColor(circleBackgroundRes)); + } + /** * Return the color drawn behind the circle-shaped drawable. * * @return The color drawn behind the drawable * - * @deprecated Fill color support is going to be removed in the future + * @deprecated Use {@link #getCircleBackgroundColor()} instead. */ @Deprecated public int getFillColor() { - return mFillColor; + return getCircleBackgroundColor(); } /** @@ -207,17 +233,11 @@ public int getFillColor() { * * @param fillColor The color to be drawn behind the drawable * - * @deprecated Fill color support is going to be removed in the future + * @deprecated Use {@link #setCircleBackgroundColor(int)} instead. */ @Deprecated public void setFillColor(@ColorInt int fillColor) { - if (fillColor == mFillColor) { - return; - } - - mFillColor = fillColor; - mFillPaint.setColor(fillColor); - invalidate(); + setCircleBackgroundColor(fillColor); } /** @@ -227,11 +247,11 @@ public void setFillColor(@ColorInt int fillColor) { * @param fillColorRes The color resource to be resolved to a color and * drawn behind the drawable * - * @deprecated Fill color support is going to be removed in the future + * @deprecated Use {@link #setCircleBackgroundColorResource(int)} instead. */ @Deprecated public void setFillColorResource(@ColorRes int fillColorRes) { - setFillColor(getContext().getResources().getColor(fillColorRes)); + setCircleBackgroundColorResource(fillColorRes); } public int getBorderWidth() { @@ -381,9 +401,9 @@ private void setup() { mBorderPaint.setColor(mBorderColor); mBorderPaint.setStrokeWidth(mBorderWidth); - mFillPaint.setStyle(Paint.Style.FILL); - mFillPaint.setAntiAlias(true); - mFillPaint.setColor(mFillColor); + mCircleBackgroundPaint.setStyle(Paint.Style.FILL); + mCircleBackgroundPaint.setAntiAlias(true); + mCircleBackgroundPaint.setColor(mCircleBackgroundColor); mBitmapHeight = mBitmap.getHeight(); mBitmapWidth = mBitmap.getWidth(); diff --git a/circleimageview/src/main/res/values/attrs.xml b/circleimageview/src/main/res/values/attrs.xml index ab6c430..16aff53 100644 --- a/circleimageview/src/main/res/values/attrs.xml +++ b/circleimageview/src/main/res/values/attrs.xml @@ -4,6 +4,8 @@ + + From b271832117627294d5029b4e69ddd9300d300857 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 13 Mar 2017 08:18:42 +0100 Subject: [PATCH 24/58] Add custom outline provider to support elevation --- .../circleimageview/CircleImageView.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index ba8e0f8..6eb3b0d 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -23,17 +23,23 @@ import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.Matrix; +import android.graphics.Outline; import android.graphics.Paint; +import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Shader; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; +import android.os.Build; import android.support.annotation.ColorInt; import android.support.annotation.ColorRes; import android.support.annotation.DrawableRes; +import android.support.annotation.RequiresApi; import android.util.AttributeSet; +import android.view.View; +import android.view.ViewOutlineProvider; import android.widget.ImageView; public class CircleImageView extends ImageView { @@ -112,6 +118,10 @@ private void init() { super.setScaleType(SCALE_TYPE); mReady = true; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + setOutlineProvider(new OutlineProvider()); + } + if (mSetupPending) { setup(); mSetupPending = false; @@ -455,4 +465,16 @@ private void updateShaderMatrix() { mBitmapShader.setLocalMatrix(mShaderMatrix); } + @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) + private class OutlineProvider extends ViewOutlineProvider { + + @Override + public void getOutline(View view, Outline outline) { + Rect bounds = new Rect(); + mBorderRect.roundOut(bounds); + outline.setRoundRect(bounds, bounds.width() / 2.0f); + } + + } + } From 1b5424662e34fd75199ff450c04d6e2fda258dcc Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Fri, 29 Sep 2017 16:47:40 +0200 Subject: [PATCH 25/58] Add FAQ section to README --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 66c61e5..5bd5492 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,24 @@ Limitations * If you use an image loading library like Picasso or Glide, you need to disable their fade animations to avoid messed up images. For Picasso use the `noFade()` option, for Glide use `dontAnimate()`. If you want to keep the fadeIn animation, you have to fetch the image into a `Target` and apply a custom animation yourself when receiving the `Bitmap`. * Using a `TransitionDrawable` with `CircleImageView` doesn't work properly and leads to messed up images. +FAQ +--- +**How can I use a `VectorDrawable` with `CircleImageView`?** + +Short answer: you shouldn't. Using a `VectorDrawable` with `CircleImageView` is very inefficient. You should modify your vectors to be in a circular shape and use them with a regular ImageView instead. + +**Why doesn't `CircleImageView` extend `AppCompatImageView`?** + +Extending `AppCompatImageView` would require adding a runtime dependency for the support library without any real benefit. + +**How can I add a selector (e.g. ripple effect) bound to a circle?** + +There's currently no direct support for a circle bound selector but you can follow [these steps](https://github.com/hdodenhof/CircleImageView/issues/153#issuecomment-249692049) to implement it yourself. + +**How can I add a gap between image and border?** + +Adding a gap is also not support directly but [there's a workaround](https://github.com/hdodenhof/CircleImageView/issues/133#issuecomment-225437930). + Changelog --------- * **2.1.0** From d03e825c2b0a02f883f95cbcb8bb7ef371a36564 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Fri, 29 Sep 2017 17:55:06 +0200 Subject: [PATCH 26/58] Add 'next' section to changelog --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 5bd5492..1c5652c 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,9 @@ Adding a gap is also not support directly but [there's a workaround](https://git Changelog --------- +* **next** + * Add support for elevation + * Add circle background color attribute to replace fill color * **2.1.0** * Add support for padding * Add option to disable circular transformation From 586c31f9e3718958ef76b410d92ea87f75dd4324 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sat, 30 Sep 2017 12:11:05 +0200 Subject: [PATCH 27/58] Next version is 2.2.0 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b2f138e..55dc4a9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.1.1-SNAPSHOT +VERSION_NAME=2.2.0-SNAPSHOT GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From cc6f3809d941b3d7413be4bd215c2f39e5e227e1 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Tue, 10 Oct 2017 15:58:37 +0200 Subject: [PATCH 28/58] Prepare release v2.2.0 --- README.md | 4 ++-- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1c5652c..f126c86 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Gradle ``` dependencies { ... - compile 'de.hdodenhof:circleimageview:2.1.0' + compile 'de.hdodenhof:circleimageview:2.2.0' } ``` @@ -61,7 +61,7 @@ Adding a gap is also not support directly but [there's a workaround](https://git Changelog --------- -* **next** +* **2.2.0** * Add support for elevation * Add circle background color attribute to replace fill color * **2.1.0** diff --git a/gradle.properties b/gradle.properties index 55dc4a9..aa204a0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.2.0-SNAPSHOT +VERSION_NAME=2.2.0 GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From 0e23ac2269c6451e6ba7f3d0ba214d9f45afa70f Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Tue, 10 Oct 2017 15:59:29 +0200 Subject: [PATCH 29/58] Prepare for next release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index aa204a0..e2abcae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.2.0 +VERSION_NAME=2.2.1-SNAPSHOT GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From 39164372e2f5d39a1eecfd257f5db5158c30ad06 Mon Sep 17 00:00:00 2001 From: Job Getabu Date: Thu, 22 Mar 2018 12:34:15 +0300 Subject: [PATCH 30/58] efficient gradle import with :implementation no leaking of dependencies, faster parallel builds --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f126c86..82b29bc 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ Gradle dependencies { ... compile 'de.hdodenhof:circleimageview:2.2.0' + //or + implementation 'de.hdodenhof:circleimageview:2.2.0' } ``` From 53925bcf7d7a6ccecdaafae276a8326ea2c14aaa Mon Sep 17 00:00:00 2001 From: caleb Date: Fri, 30 Mar 2018 13:43:57 -0600 Subject: [PATCH 31/58] bump sdk and support lib versions --- build.gradle | 2 +- circleimageview/build.gradle | 8 ++++---- sample/build.gradle | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 5a64852..5161f0e 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0-beta6' + classpath 'com.android.tools.build:gradle:3.0.1' } } diff --git a/circleimageview/build.gradle b/circleimageview/build.gradle index 796806e..0eadc2e 100644 --- a/circleimageview/build.gradle +++ b/circleimageview/build.gradle @@ -1,17 +1,17 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 26 - buildToolsVersion '26.0.1' + compileSdkVersion 27 + buildToolsVersion '27.0.3' defaultConfig { minSdkVersion 8 - targetSdkVersion 26 + targetSdkVersion 27 } } dependencies { - provided 'com.android.support:support-annotations:26.1.0' + provided 'com.android.support:support-annotations:27.1.0' } apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' \ No newline at end of file diff --git a/sample/build.gradle b/sample/build.gradle index 01fc173..1220721 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 26 - buildToolsVersion '26.0.1' + compileSdkVersion 27 + buildToolsVersion '27.0.3' defaultConfig { minSdkVersion 8 - targetSdkVersion 26 + targetSdkVersion 27 } } From edd7aefd5bb7f40706704164cc6d502a2537ce12 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 2 Apr 2018 13:55:58 +0200 Subject: [PATCH 32/58] Update Gradle to 4.4, Android plugin to 3.1.0 --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 5161f0e..63349f8 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:3.1.0' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 294a2c3..cf8da48 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Sep 29 10:49:45 CEST 2017 +#Mon Apr 02 13:45:46 CEST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip From 8e9adbfeb100b0c513895306260b7056afea38ce Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 2 Apr 2018 13:57:28 +0200 Subject: [PATCH 33/58] Switch to new dependency configurations --- README.md | 2 -- circleimageview/build.gradle | 2 +- sample/build.gradle | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 82b29bc..cf2960b 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,6 @@ Gradle ``` dependencies { ... - compile 'de.hdodenhof:circleimageview:2.2.0' - //or implementation 'de.hdodenhof:circleimageview:2.2.0' } ``` diff --git a/circleimageview/build.gradle b/circleimageview/build.gradle index 0eadc2e..75336ad 100644 --- a/circleimageview/build.gradle +++ b/circleimageview/build.gradle @@ -11,7 +11,7 @@ android { } dependencies { - provided 'com.android.support:support-annotations:27.1.0' + compileOnly 'com.android.support:support-annotations:27.1.0' } apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' \ No newline at end of file diff --git a/sample/build.gradle b/sample/build.gradle index 1220721..f3688a8 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -11,5 +11,5 @@ android { } dependencies { - compile project(':circleimageview') + implementation project(':circleimageview') } \ No newline at end of file From e14b38a8a742e8f7f3d816db0b76910e0c7bb0f5 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 2 Apr 2018 13:59:08 +0200 Subject: [PATCH 34/58] Update copyright date range --- README.md | 2 +- .../main/java/de/hdodenhof/circleimageview/CircleImageView.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf2960b..2229ed7 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ Changelog License ------- - Copyright 2014 - 2017 Henning Dodenhof + Copyright 2014 - 2018 Henning Dodenhof Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 6eb3b0d..3c1778d 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 - 2017 Henning Dodenhof + * Copyright 2014 - 2018 Henning Dodenhof * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From e9ce455fdd2cceed5d5dab2a1fc7216deb7d2b37 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Tue, 5 Jun 2018 21:22:52 +0200 Subject: [PATCH 35/58] Limit touch event handling to circle area --- README.md | 2 ++ .../de/hdodenhof/circleimageview/CircleImageView.java | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 2229ed7..c30820d 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ Adding a gap is also not support directly but [there's a workaround](https://git Changelog --------- +* **next** + * Limit touch event handling to circle area * **2.2.0** * Add support for elevation * Add circle background color attribute to replace fill color diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 3c1778d..0dbb915 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -38,6 +38,7 @@ import android.support.annotation.DrawableRes; import android.support.annotation.RequiresApi; import android.util.AttributeSet; +import android.view.MotionEvent; import android.view.View; import android.view.ViewOutlineProvider; import android.widget.ImageView; @@ -465,6 +466,15 @@ private void updateShaderMatrix() { mBitmapShader.setLocalMatrix(mShaderMatrix); } + @Override + public boolean onTouchEvent(MotionEvent event) { + return inTouchableArea(event.getX(), event.getY()) && super.onTouchEvent(event); + } + + private boolean inTouchableArea(float x, float y) { + return Math.pow(x - mBorderRect.centerX(), 2) + Math.pow(y - mBorderRect.centerY(), 2) <= Math.pow(mBorderRadius, 2); + } + @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) private class OutlineProvider extends ViewOutlineProvider { From 0eaf7bb4e99629b6ca0d10b26f124729d111dfe1 Mon Sep 17 00:00:00 2001 From: Keita Watanabe Date: Thu, 27 Sep 2018 11:24:38 +0900 Subject: [PATCH 36/58] Update all the things; migrate to AndroidX --- README.md | 1 + build.gradle | 2 +- circleimageview/build.gradle | 8 ++++---- .../de/hdodenhof/circleimageview/CircleImageView.java | 8 ++++---- gradle.properties | 3 +++ gradle/wrapper/gradle-wrapper.properties | 2 +- sample/build.gradle | 6 +++--- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c30820d..be5aad8 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Changelog --------- * **next** * Limit touch event handling to circle area + * Migrate to AndroidX * **2.2.0** * Add support for elevation * Add circle background color attribute to replace fill color diff --git a/build.gradle b/build.gradle index 63349f8..207e93e 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' + classpath 'com.android.tools.build:gradle:3.2.1' } } diff --git a/circleimageview/build.gradle b/circleimageview/build.gradle index 75336ad..503f7a1 100644 --- a/circleimageview/build.gradle +++ b/circleimageview/build.gradle @@ -1,17 +1,17 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 27 - buildToolsVersion '27.0.3' + compileSdkVersion 28 + buildToolsVersion '28.0.3' defaultConfig { minSdkVersion 8 - targetSdkVersion 27 + targetSdkVersion 28 } } dependencies { - compileOnly 'com.android.support:support-annotations:27.1.0' + compileOnly 'androidx.annotation:annotation:1.0.1' } apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' \ No newline at end of file diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 0dbb915..471ae53 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -33,15 +33,15 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.RequiresApi; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.ViewOutlineProvider; import android.widget.ImageView; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.RequiresApi; public class CircleImageView extends ImageView { diff --git a/gradle.properties b/gradle.properties index e2abcae..85e453f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,3 +11,6 @@ POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt POM_LICENCE_DIST=repo POM_DEVELOPER_ID=hdodenhof POM_DEVELOPER_NAME=Henning Dodenhof + +android.useAndroidX=true +android.enableJetifier=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index cf8da48..ea03a2d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip diff --git a/sample/build.gradle b/sample/build.gradle index f3688a8..53ad3aa 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 - buildToolsVersion '27.0.3' + compileSdkVersion 28 + buildToolsVersion '28.0.3' defaultConfig { minSdkVersion 8 - targetSdkVersion 27 + targetSdkVersion 28 } } From a2ff0a2d6b04c09b8533bd8133cdd9b330718d5b Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Thu, 3 Jan 2019 21:17:26 +0100 Subject: [PATCH 37/58] Update copyright date range to include 2019 --- README.md | 2 +- .../main/java/de/hdodenhof/circleimageview/CircleImageView.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index be5aad8..faba684 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ Changelog License ------- - Copyright 2014 - 2018 Henning Dodenhof + Copyright 2014 - 2019 Henning Dodenhof Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 471ae53..2feff14 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 - 2018 Henning Dodenhof + * Copyright 2014 - 2019 Henning Dodenhof * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 2e7d1ff009d8bd34a8e35d16e9f44ef994b4d3d0 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 6 Jan 2019 11:47:54 +0100 Subject: [PATCH 38/58] Next version is 3.0.0 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 85e453f..98ff032 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.2.1-SNAPSHOT +VERSION_NAME=3.0.0-SNAPSHOT GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From 4676cd5a28c28af4f2c4bd2e82f7ce4c25a7f8a1 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 6 Jan 2019 11:48:06 +0100 Subject: [PATCH 39/58] Remove deprecated properties and methods --- README.md | 1 + .../circleimageview/CircleImageView.java | 57 +------------------ circleimageview/src/main/res/values/attrs.xml | 2 - 3 files changed, 2 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index faba684..2337b26 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ Changelog * **next** * Limit touch event handling to circle area * Migrate to AndroidX + * Remove deprecated properties and methods * **2.2.0** * Add support for elevation * Add circle background color attribute to replace fill color diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 2feff14..a541132 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -100,15 +100,7 @@ public CircleImageView(Context context, AttributeSet attrs, int defStyle) { mBorderWidth = a.getDimensionPixelSize(R.styleable.CircleImageView_civ_border_width, DEFAULT_BORDER_WIDTH); mBorderColor = a.getColor(R.styleable.CircleImageView_civ_border_color, DEFAULT_BORDER_COLOR); mBorderOverlay = a.getBoolean(R.styleable.CircleImageView_civ_border_overlay, DEFAULT_BORDER_OVERLAY); - - // Look for deprecated civ_fill_color if civ_circle_background_color is not set - if (a.hasValue(R.styleable.CircleImageView_civ_circle_background_color)) { - mCircleBackgroundColor = a.getColor(R.styleable.CircleImageView_civ_circle_background_color, - DEFAULT_CIRCLE_BACKGROUND_COLOR); - } else if (a.hasValue(R.styleable.CircleImageView_civ_fill_color)) { - mCircleBackgroundColor = a.getColor(R.styleable.CircleImageView_civ_fill_color, - DEFAULT_CIRCLE_BACKGROUND_COLOR); - } + mCircleBackgroundColor = a.getColor(R.styleable.CircleImageView_civ_circle_background_color, DEFAULT_CIRCLE_BACKGROUND_COLOR); a.recycle(); @@ -200,14 +192,6 @@ public void setBorderColor(@ColorInt int borderColor) { invalidate(); } - /** - * @deprecated Use {@link #setBorderColor(int)} instead - */ - @Deprecated - public void setBorderColorResource(@ColorRes int borderColorRes) { - setBorderColor(getContext().getResources().getColor(borderColorRes)); - } - public int getCircleBackgroundColor() { return mCircleBackgroundColor; } @@ -226,45 +210,6 @@ public void setCircleBackgroundColorResource(@ColorRes int circleBackgroundRes) setCircleBackgroundColor(getContext().getResources().getColor(circleBackgroundRes)); } - /** - * Return the color drawn behind the circle-shaped drawable. - * - * @return The color drawn behind the drawable - * - * @deprecated Use {@link #getCircleBackgroundColor()} instead. - */ - @Deprecated - public int getFillColor() { - return getCircleBackgroundColor(); - } - - /** - * Set a color to be drawn behind the circle-shaped drawable. Note that - * this has no effect if the drawable is opaque or no drawable is set. - * - * @param fillColor The color to be drawn behind the drawable - * - * @deprecated Use {@link #setCircleBackgroundColor(int)} instead. - */ - @Deprecated - public void setFillColor(@ColorInt int fillColor) { - setCircleBackgroundColor(fillColor); - } - - /** - * Set a color to be drawn behind the circle-shaped drawable. Note that - * this has no effect if the drawable is opaque or no drawable is set. - * - * @param fillColorRes The color resource to be resolved to a color and - * drawn behind the drawable - * - * @deprecated Use {@link #setCircleBackgroundColorResource(int)} instead. - */ - @Deprecated - public void setFillColorResource(@ColorRes int fillColorRes) { - setCircleBackgroundColorResource(fillColorRes); - } - public int getBorderWidth() { return mBorderWidth; } diff --git a/circleimageview/src/main/res/values/attrs.xml b/circleimageview/src/main/res/values/attrs.xml index 16aff53..bdfc2b1 100644 --- a/circleimageview/src/main/res/values/attrs.xml +++ b/circleimageview/src/main/res/values/attrs.xml @@ -4,8 +4,6 @@ - - From 528125cae927614a63ffc0b9314cd8b9fd6326fd Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 6 Jan 2019 11:54:07 +0100 Subject: [PATCH 40/58] Remove unnecessary null check --- .../java/de/hdodenhof/circleimageview/CircleImageView.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index a541132..251a760 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -290,9 +290,7 @@ public ColorFilter getColorFilter() { } private void applyColorFilter() { - if (mBitmapPaint != null) { - mBitmapPaint.setColorFilter(mColorFilter); - } + mBitmapPaint.setColorFilter(mColorFilter); } private Bitmap getBitmapFromDrawable(Drawable drawable) { From d5a92b5315f8f5216c5ddf3c7d2ad94d2c9d5f19 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 6 Jan 2019 12:24:07 +0100 Subject: [PATCH 41/58] Suppress useless warnings in library --- .../java/de/hdodenhof/circleimageview/CircleImageView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 251a760..bd400cf 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -15,6 +15,7 @@ */ package de.hdodenhof.circleimageview; +import android.annotation.SuppressLint; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Bitmap; @@ -43,6 +44,7 @@ import androidx.annotation.DrawableRes; import androidx.annotation.RequiresApi; +@SuppressWarnings("UnusedDeclaration") public class CircleImageView extends ImageView { private static final ScaleType SCALE_TYPE = ScaleType.CENTER_CROP; @@ -409,6 +411,7 @@ private void updateShaderMatrix() { mBitmapShader.setLocalMatrix(mShaderMatrix); } + @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(MotionEvent event) { return inTouchableArea(event.getX(), event.getY()) && super.onTouchEvent(event); From 930aeaf1ba4158bc4ff2dbe2f57bde32e3e4244c Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 6 Jan 2019 12:24:52 +0100 Subject: [PATCH 42/58] Fix warnings in sample app --- sample/build.gradle | 2 +- sample/src/main/AndroidManifest.xml | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sample/build.gradle b/sample/build.gradle index 53ad3aa..0c7059d 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -5,7 +5,7 @@ android { buildToolsVersion '28.0.3' defaultConfig { - minSdkVersion 8 + minSdkVersion 14 targetSdkVersion 28 } } diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index ffe9dd1..74ca48e 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -1,12 +1,16 @@ - + android:theme="@style/AppTheme" + tools:ignore="GoogleAppIndexingWarning"> + @@ -16,6 +20,7 @@ + From 8a24219ffc7309f38f1c63f4e801802724066dcb Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 6 Jan 2019 12:49:32 +0100 Subject: [PATCH 43/58] Prepare release 3.0.0 --- README.md | 4 ++-- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2337b26..551f6d1 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Gradle ``` dependencies { ... - implementation 'de.hdodenhof:circleimageview:2.2.0' + implementation 'de.hdodenhof:circleimageview:3.0.0' } ``` @@ -61,7 +61,7 @@ Adding a gap is also not support directly but [there's a workaround](https://git Changelog --------- -* **next** +* **3.0.0** * Limit touch event handling to circle area * Migrate to AndroidX * Remove deprecated properties and methods diff --git a/gradle.properties b/gradle.properties index 98ff032..800dbb9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=3.0.0-SNAPSHOT +VERSION_NAME=3.0.0 GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From 99bd20ea9497ef540d8f15fe5d5b33e7ebcf6685 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 6 Jan 2019 12:52:15 +0100 Subject: [PATCH 44/58] Prepare for next release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 800dbb9..fa4c4a5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=3.0.0 +VERSION_NAME=3.1.0-SNAPSHOT GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From e0e4384ed030afc0353998af676f2988eb9fea2a Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 26 Aug 2019 15:28:19 +0200 Subject: [PATCH 45/58] Fire touch event even if view is empty --- .../java/de/hdodenhof/circleimageview/CircleImageView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index bd400cf..80ee480 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -418,6 +418,10 @@ public boolean onTouchEvent(MotionEvent event) { } private boolean inTouchableArea(float x, float y) { + if (mBorderRect.isEmpty()) { + return true; + } + return Math.pow(x - mBorderRect.centerX(), 2) + Math.pow(y - mBorderRect.centerY(), 2) <= Math.pow(mBorderRadius, 2); } From c109651db74fcb94ed57ed85e721384ed6535d2b Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 26 Aug 2019 15:28:50 +0200 Subject: [PATCH 46/58] Don't limit touchable area to a circle if transformation is disabled --- .../java/de/hdodenhof/circleimageview/CircleImageView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 80ee480..6ec5b32 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -414,6 +414,10 @@ private void updateShaderMatrix() { @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(MotionEvent event) { + if (mDisableCircularTransformation) { + return super.onTouchEvent(event); + } + return inTouchableArea(event.getX(), event.getY()) && super.onTouchEvent(event); } From 1482d9be1026ff0be56df07e1d32d05f94c0def0 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 26 Aug 2019 15:34:45 +0200 Subject: [PATCH 47/58] Prepare release 3.0.1 --- README.md | 5 ++++- gradle.properties | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 551f6d1..1036e41 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Gradle ``` dependencies { ... - implementation 'de.hdodenhof:circleimageview:3.0.0' + implementation 'de.hdodenhof:circleimageview:3.0.1' } ``` @@ -61,6 +61,9 @@ Adding a gap is also not support directly but [there's a workaround](https://git Changelog --------- +* **3.0.1** + * Fix touch event not fired if view is empty + * Fix touchable area limited to a circle even if transformation is disabled * **3.0.0** * Limit touch event handling to circle area * Migrate to AndroidX diff --git a/gradle.properties b/gradle.properties index fa4c4a5..da64f54 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=3.1.0-SNAPSHOT +VERSION_NAME=3.0.1 GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From a8aeeff9543f0fe1d1a786ccd0ea20da5ad6c8ec Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 26 Aug 2019 15:51:25 +0200 Subject: [PATCH 48/58] Prepare for next release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index da64f54..fa4c4a5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=3.0.1 +VERSION_NAME=3.1.0-SNAPSHOT GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From e593101e57ff543ab902c012e8915fb43a6b7e5c Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Mon, 26 Aug 2019 15:51:49 +0200 Subject: [PATCH 49/58] Update Gradle to 5.4.1, Android plugin to 3.5.0 --- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 207e93e..91206d4 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:3.5.0' } } @@ -17,4 +17,4 @@ allprojects { jcenter() google() } -} \ No newline at end of file +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ea03a2d..98921f7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Apr 02 13:45:46 CEST 2018 +#Mon Aug 26 15:02:41 CEST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip From 3fef33b9fbd8df45a7c6134f50e2acbbecf75a0f Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Wed, 28 Aug 2019 11:44:09 +0200 Subject: [PATCH 50/58] Fall back to default outline provider if circular transformation is disabled --- .../de/hdodenhof/circleimageview/CircleImageView.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 6ec5b32..b8670bf 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -434,9 +434,13 @@ private class OutlineProvider extends ViewOutlineProvider { @Override public void getOutline(View view, Outline outline) { - Rect bounds = new Rect(); - mBorderRect.roundOut(bounds); - outline.setRoundRect(bounds, bounds.width() / 2.0f); + if (mDisableCircularTransformation) { + ViewOutlineProvider.BACKGROUND.getOutline(view, outline); + } else { + Rect bounds = new Rect(); + mBorderRect.roundOut(bounds); + outline.setRoundRect(bounds, bounds.width() / 2.0f); + } } } From 541f2e37e757a474f812d59e31bf86bc28be7116 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Wed, 1 Jan 2020 12:48:36 +0100 Subject: [PATCH 51/58] Update all the things --- build.gradle | 2 +- circleimageview/build.gradle | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 4 ++-- sample/build.gradle | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 91206d4..2cfdd16 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:3.5.3' } } diff --git a/circleimageview/build.gradle b/circleimageview/build.gradle index 503f7a1..84b2ffd 100644 --- a/circleimageview/build.gradle +++ b/circleimageview/build.gradle @@ -1,17 +1,17 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 28 - buildToolsVersion '28.0.3' + compileSdkVersion 29 + buildToolsVersion '29.0.2' defaultConfig { minSdkVersion 8 - targetSdkVersion 28 + targetSdkVersion 29 } } dependencies { - compileOnly 'androidx.annotation:annotation:1.0.1' + compileOnly 'androidx.annotation:annotation:1.1.0' } apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 98921f7..d5e0f6f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Aug 26 15:02:41 CEST 2019 +#Wed Jan 01 12:46:55 CET 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip diff --git a/sample/build.gradle b/sample/build.gradle index 0c7059d..32f4c20 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 28 - buildToolsVersion '28.0.3' + compileSdkVersion 29 + buildToolsVersion '29.0.2' defaultConfig { minSdkVersion 14 - targetSdkVersion 28 + targetSdkVersion 29 } } From f03cd288f35a51a3ea854282fb483d8238559382 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Wed, 1 Jan 2020 12:53:03 +0100 Subject: [PATCH 52/58] Update copyright date range --- README.md | 2 +- .../main/java/de/hdodenhof/circleimageview/CircleImageView.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1036e41..66e7133 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ Changelog License ------- - Copyright 2014 - 2019 Henning Dodenhof + Copyright 2014 - 2020 Henning Dodenhof Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index b8670bf..c87254c 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 - 2019 Henning Dodenhof + * Copyright 2014 - 2020 Henning Dodenhof * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 4b8cc02e2294f3711dbe273d2973d9f84d73718e Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Wed, 1 Jan 2020 14:45:09 +0100 Subject: [PATCH 53/58] Guard setting color filter by null check This fixes a regression introduced with 528125cae927614a63ffc0b9314cd8b9fd6326fd. Add comment to make sure the check stays this time. See #326 and #105. --- .../java/de/hdodenhof/circleimageview/CircleImageView.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index c87254c..77f9917 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -291,8 +291,13 @@ public ColorFilter getColorFilter() { return mColorFilter; } + @SuppressWarnings("ConstantConditions") private void applyColorFilter() { - mBitmapPaint.setColorFilter(mColorFilter); + // This might be called from setColorFilter during ImageView construction + // before member initialization has finished on API level <= 19. + if (mBitmapPaint != null) { + mBitmapPaint.setColorFilter(mColorFilter); + } } private Bitmap getBitmapFromDrawable(Drawable drawable) { From 7a21bb07e0373a037ed1a19c0cdd4a2e0576b17d Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Wed, 1 Jan 2020 20:47:49 +0100 Subject: [PATCH 54/58] Add newline to end of files where missing --- circleimageview/build.gradle | 2 +- circleimageview/gradle.properties | 2 +- circleimageview/src/main/AndroidManifest.xml | 2 +- sample/build.gradle | 2 +- sample/proguard-rules.txt | 2 +- sample/src/main/res/values/colors.xml | 2 +- settings.gradle | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/circleimageview/build.gradle b/circleimageview/build.gradle index 84b2ffd..de0a2f7 100644 --- a/circleimageview/build.gradle +++ b/circleimageview/build.gradle @@ -14,4 +14,4 @@ dependencies { compileOnly 'androidx.annotation:annotation:1.1.0' } -apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' \ No newline at end of file +apply from: 'https://raw.github.com/hdodenhof/gradle-mvn-push/master/gradle-mvn-push.gradle' diff --git a/circleimageview/gradle.properties b/circleimageview/gradle.properties index aeb7191..657a307 100644 --- a/circleimageview/gradle.properties +++ b/circleimageview/gradle.properties @@ -1,3 +1,3 @@ POM_NAME=CircleImageView POM_ARTIFACT_ID=circleimageview -POM_PACKAGING=aar \ No newline at end of file +POM_PACKAGING=aar diff --git a/circleimageview/src/main/AndroidManifest.xml b/circleimageview/src/main/AndroidManifest.xml index 432e859..d9f621e 100644 --- a/circleimageview/src/main/AndroidManifest.xml +++ b/circleimageview/src/main/AndroidManifest.xml @@ -4,4 +4,4 @@ - \ No newline at end of file + diff --git a/sample/build.gradle b/sample/build.gradle index 32f4c20..9f16058 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -12,4 +12,4 @@ android { dependencies { implementation project(':circleimageview') -} \ No newline at end of file +} diff --git a/sample/proguard-rules.txt b/sample/proguard-rules.txt index 21a30b1..59985f0 100644 --- a/sample/proguard-rules.txt +++ b/sample/proguard-rules.txt @@ -14,4 +14,4 @@ # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; -#} \ No newline at end of file +#} diff --git a/sample/src/main/res/values/colors.xml b/sample/src/main/res/values/colors.xml index f7fe3c0..ea49b51 100644 --- a/sample/src/main/res/values/colors.xml +++ b/sample/src/main/res/values/colors.xml @@ -4,4 +4,4 @@ #FF222222 #FFEEEEEE - \ No newline at end of file + diff --git a/settings.gradle b/settings.gradle index 8fbd5fe..0503e7f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -include ':circleimageview', ':sample' \ No newline at end of file +include ':circleimageview', ':sample' From 2b0ba76c6bcfff07b36d08101c257c6a516f58dd Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Fri, 17 Jan 2020 16:18:52 +0100 Subject: [PATCH 55/58] Prepare release 3.0.2 --- README.md | 5 ++++- gradle.properties | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 66e7133..df90895 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Gradle ``` dependencies { ... - implementation 'de.hdodenhof:circleimageview:3.0.1' + implementation 'de.hdodenhof:circleimageview:3.0.2' } ``` @@ -61,6 +61,9 @@ Adding a gap is also not support directly but [there's a workaround](https://git Changelog --------- +* **3.0.2** + * Fix NPE during initialization on API level <= 19 + * Fix wrong outline being provided if circular transformation is disabled * **3.0.1** * Fix touch event not fired if view is empty * Fix touchable area limited to a circle even if transformation is disabled diff --git a/gradle.properties b/gradle.properties index fa4c4a5..b242bd3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=3.1.0-SNAPSHOT +VERSION_NAME=3.0.2 GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From f31f7fc693a8567239af6ff221935285d4a8fae7 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Fri, 17 Jan 2020 16:19:18 +0100 Subject: [PATCH 56/58] Prepare for next release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b242bd3..fa4c4a5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=3.0.2 +VERSION_NAME=3.1.0-SNAPSHOT GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android From 0793af5bf01a8773b8fa31deabe62b3909489f88 Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 26 Jan 2020 11:50:04 +0100 Subject: [PATCH 57/58] Enable bitmap filtering and dithering This aligns the paint flags with those a BitmapDrawable uses. --- .../main/java/de/hdodenhof/circleimageview/CircleImageView.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java index 77f9917..ca7bc0a 100644 --- a/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java +++ b/circleimageview/src/main/java/de/hdodenhof/circleimageview/CircleImageView.java @@ -355,6 +355,8 @@ private void setup() { mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); mBitmapPaint.setAntiAlias(true); + mBitmapPaint.setDither(true); + mBitmapPaint.setFilterBitmap(true); mBitmapPaint.setShader(mBitmapShader); mBorderPaint.setStyle(Paint.Style.STROKE); From b2c76d51b394b140bbfaf692eb4071613ac36cdb Mon Sep 17 00:00:00 2001 From: Henning Dodenhof Date: Sun, 26 Jan 2020 11:51:38 +0100 Subject: [PATCH 58/58] Prepare release 3.1.0 --- README.md | 4 +++- gradle.properties | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df90895..bd59c17 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Gradle ``` dependencies { ... - implementation 'de.hdodenhof:circleimageview:3.0.2' + implementation 'de.hdodenhof:circleimageview:3.1.0' } ``` @@ -61,6 +61,8 @@ Adding a gap is also not support directly but [there's a workaround](https://git Changelog --------- +* **3.1.0** + * Align bitmap paint flags with BitmapDrawable (improves scaling) * **3.0.2** * Fix NPE during initialization on API level <= 19 * Fix wrong outline being provided if circular transformation is disabled diff --git a/gradle.properties b/gradle.properties index fa4c4a5..5d7e3c1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=3.1.0-SNAPSHOT +VERSION_NAME=3.1.0 GROUP=de.hdodenhof POM_DESCRIPTION=A fast circular ImageView for Android