Skip to content

Commit a1b3cef

Browse files
author
Bartosz Lipinski
committed
Merge branch 'release/1.4.1'
2 parents 26c12b9 + 8358a64 commit a1b3cef

File tree

7 files changed

+23
-13
lines changed

7 files changed

+23
-13
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 1.4.1 *(2015-12-18)*
2+
----------------------------
3+
4+
* Added missing exception when there's no Percent Support Library in the project and user is trying to animate percent parameters
5+
* Size percent argument type corrected
6+
17
Version 1.4.0 *(2015-12-14)*
28
----------------------------
39

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You can grab the library via Maven Central. Just add a proper dependency inside
4242

4343
```xml
4444
dependencies {
45-
compile 'com.bartoszlipinski:viewpropertyobjectanimator:1.4.0'
45+
compile 'com.bartoszlipinski:viewpropertyobjectanimator:1.4.1'
4646
}
4747
```
4848

gradle.properties

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

55
POM_DESCRIPTION=Wrapper of the ObjectAnimator that can be used similarly to ViewPropertyAnimator

library/build.gradle

Lines changed: 2 additions & 2 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.4.0"
10+
versionCode 7
11+
versionName "1.4.1"
1212
}
1313
buildTypes {
1414
release {

library/src/main/java/com/bartoszlipinski/viewpropertyobjectanimator/PercentChangeListener.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ class PercentChangeListener extends ChangeUpdateListener implements AnimatorUpda
4242
ViewGroup.LayoutParams params = view.getLayoutParams();
4343
if (params == null) {
4444
throw new IllegalStateException("View does not have layout params yet.");
45-
} else if (!(params instanceof PercentLayoutHelper.PercentLayoutParams)) {
46-
throw new IllegalStateException("Animating percent parameters (aspectRatio is also a \"percent parameter\") is available only for children of PercentRelativeLayout or PercentFrameLayout.");
45+
}
46+
try {
47+
if (!(params instanceof PercentLayoutHelper.PercentLayoutParams)) {
48+
throw new IllegalStateException("Animating percent parameters (aspectRatio is also a \"percent parameter\") is available only for children of PercentRelativeLayout or PercentFrameLayout (part of the Percent Support Library).");
49+
}
50+
} catch (NoClassDefFoundError error) {
51+
throw new IllegalStateException("Animating percent parameters (aspectRatio is also a \"percent parameter\") is available only for children of PercentRelativeLayout or PercentFrameLayout (part of the Percent Support Library).");
4752
}
4853
mPercentLayoutInfo = ((PercentLayoutHelper.PercentLayoutParams) params).getPercentLayoutInfo();
4954
}
@@ -97,7 +102,7 @@ public void sizePercent(float sizePercent) {
97102
heightPercent(sizePercent);
98103
}
99104

100-
public void sizePercentBy(int sizePercentBy) {
105+
public void sizePercentBy(float sizePercentBy) {
101106
widthPercentBy(sizePercentBy);
102107
heightPercentBy(sizePercentBy);
103108
}

library/src/main/java/com/bartoszlipinski/viewpropertyobjectanimator/ViewPropertyObjectAnimator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,14 @@ public ViewPropertyObjectAnimator heightPercentBy(float heightPercentBy) {
519519
return this;
520520
}
521521

522-
public ViewPropertyObjectAnimator sizePercent(int sizePercent) {
522+
public ViewPropertyObjectAnimator sizePercent(float sizePercent) {
523523
if (initPercentListener()){
524524
mPercentListener.sizePercent(sizePercent);
525525
}
526526
return this;
527527
}
528528

529-
public ViewPropertyObjectAnimator sizePercentBy(int sizePercentBy) {
529+
public ViewPropertyObjectAnimator sizePercentBy(float sizePercentBy) {
530530
if (initPercentListener()){
531531
mPercentListener.sizePercentBy(sizePercentBy);
532532
}

sample/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "com.bartoszlipinski.viewpropertyobjectanimator.sample"
99
minSdkVersion 14
1010
targetSdkVersion 23
11-
versionCode 6
12-
versionName "1.4.0"
11+
versionCode 7
12+
versionName "1.4.1"
1313
}
1414
buildTypes {
1515
release {
@@ -23,5 +23,4 @@ dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
compile project(':library')
2525
compile 'com.android.support:appcompat-v7:23.1.1'
26-
compile "com.android.support:percent:23.1.1"
2726
}

0 commit comments

Comments
 (0)