Skip to content
This repository was archived by the owner on Jan 18, 2018. It is now read-only.

Commit d4de07a

Browse files
committed
fix: fixed a major bug in android:src
1 parent 588a6c4 commit d4de07a

5 files changed

Lines changed: 18 additions & 18 deletions

File tree

circularimageview/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
defaultConfig {
88
minSdkVersion 14
99
targetSdkVersion 23
10-
versionCode 6
11-
versionName "1.2.1"
10+
versionCode 7
11+
versionName "1.2.2"
1212
}
1313
buildTypes {
1414
release {
@@ -19,7 +19,7 @@ android {
1919
}
2020

2121
dependencies {
22-
compile 'com.android.support:support-annotations:23.1.1'
22+
compile 'com.android.support:support-annotations:23.2.1'
2323
}
2424

2525
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'

circularimageview/src/main/java/com/subinkrishna/widget/CircularImageView.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,22 +95,19 @@ public class CircularImageView
9595
mAllowCheckStateShadow = false;
9696

9797
public CircularImageView(Context context) {
98-
super(context);
99-
init(context, null);
98+
this(context, null, 0);
10099
}
101100

102101
public CircularImageView(Context context, AttributeSet attrs) {
103-
super(context, attrs);
104-
init(context, attrs);
102+
this(context, attrs, 0);
105103
}
106104

107105
public CircularImageView(Context context, AttributeSet attrs, int defStyleAttr) {
108106
super(context, attrs, defStyleAttr);
109107
init(context, attrs);
110108
}
111109

112-
private void init(Context context,
113-
AttributeSet attrs) {
110+
private void init(Context context, AttributeSet attrs) {
114111
TypedArray t = null;
115112
if (null != attrs) {
116113
t = context.getTheme().obtainStyledAttributes(attrs,
@@ -298,7 +295,10 @@ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
298295
@Override
299296
public void invalidate() {
300297
super.invalidate();
301-
updateBitmapShader();
298+
299+
if (null != mBitmapPaint) {
300+
updateBitmapShader();
301+
}
302302
}
303303

304304
@Override

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
VERSION_NAME=1.2.1
2-
VERSION_CODE=6
1+
VERSION_NAME=1.2.2
2+
VERSION_CODE=7
33
GROUP=com.subinkrishna
44

55
POM_DESCRIPTION=CircularImageView is a checkable Android ImageView implementation that draws circular images with support for optional placeholder text. CircularImageView supports Picasso & Glide.

sample/build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "com.subinkrishna.circularimageview.demo"
99
minSdkVersion 14
1010
targetSdkVersion 23
11-
versionCode 6
12-
versionName "1.2.1"
11+
versionCode 7
12+
versionName "1.2.2"
1313
}
1414

1515
signingConfigs {
@@ -31,12 +31,11 @@ android {
3131
}
3232

3333
dependencies {
34-
// compile project(':circularimageview')
34+
compile project(':circularimageview')
3535
// compile fileTree(dir: 'libs', include: ['*.jar'])
36-
compile 'com.android.support:appcompat-v7:23.1.1'
36+
compile 'com.android.support:appcompat-v7:23.2.1'
3737
compile 'com.github.bumptech.glide:glide:3.6.1'
3838
compile 'com.squareup.picasso:picasso:2.5.2'
3939
compile 'com.jakewharton:butterknife:7.0.1'
40-
compile 'com.subinkrishna:circularimageview:1.2.1'
41-
compile 'com.android.support:design:23.1.1'
40+
compile 'com.android.support:design:23.2.1'
4241
}

sample/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
android:layout_width="@dimen/civ_size"
9090
android:layout_height="@dimen/civ_size"
9191
android:layout_centerInParent="true"
92+
android:src="@drawable/placeholder"
9293
app:ci_borderColor="#FFF"
9394
app:ci_borderWidth="0dp"
9495
app:ci_placeholderBackgroundColor="#EEE"

0 commit comments

Comments
 (0)