Skip to content

Commit

Permalink
Merge branch 'release/1.4.1'
Browse files Browse the repository at this point in the history
Bartosz Lipinski committed Dec 18, 2015
2 parents 26c12b9 + 8358a64 commit a1b3cef
Showing 7 changed files with 23 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 1.4.1 *(2015-12-18)*
----------------------------

* Added missing exception when there's no Percent Support Library in the project and user is trying to animate percent parameters
* Size percent argument type corrected

Version 1.4.0 *(2015-12-14)*
----------------------------

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ You can grab the library via Maven Central. Just add a proper dependency inside

```xml
dependencies {
compile 'com.bartoszlipinski:viewpropertyobjectanimator:1.4.0'
compile 'com.bartoszlipinski:viewpropertyobjectanimator:1.4.1'
}
```

4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_NAME=1.4.0
VERSION_CODE=6
VERSION_NAME=1.4.1
VERSION_CODE=7
GROUP=com.bartoszlipinski

POM_DESCRIPTION=Wrapper of the ObjectAnimator that can be used similarly to ViewPropertyAnimator
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 6
versionName "1.4.0"
versionCode 7
versionName "1.4.1"
}
buildTypes {
release {
Original file line number Diff line number Diff line change
@@ -42,8 +42,13 @@ class PercentChangeListener extends ChangeUpdateListener implements AnimatorUpda
ViewGroup.LayoutParams params = view.getLayoutParams();
if (params == null) {
throw new IllegalStateException("View does not have layout params yet.");
} else if (!(params instanceof PercentLayoutHelper.PercentLayoutParams)) {
throw new IllegalStateException("Animating percent parameters (aspectRatio is also a \"percent parameter\") is available only for children of PercentRelativeLayout or PercentFrameLayout.");
}
try {
if (!(params instanceof PercentLayoutHelper.PercentLayoutParams)) {
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).");
}
} catch (NoClassDefFoundError error) {
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).");
}
mPercentLayoutInfo = ((PercentLayoutHelper.PercentLayoutParams) params).getPercentLayoutInfo();
}
@@ -97,7 +102,7 @@ public void sizePercent(float sizePercent) {
heightPercent(sizePercent);
}

public void sizePercentBy(int sizePercentBy) {
public void sizePercentBy(float sizePercentBy) {
widthPercentBy(sizePercentBy);
heightPercentBy(sizePercentBy);
}
Original file line number Diff line number Diff line change
@@ -519,14 +519,14 @@ public ViewPropertyObjectAnimator heightPercentBy(float heightPercentBy) {
return this;
}

public ViewPropertyObjectAnimator sizePercent(int sizePercent) {
public ViewPropertyObjectAnimator sizePercent(float sizePercent) {
if (initPercentListener()){
mPercentListener.sizePercent(sizePercent);
}
return this;
}

public ViewPropertyObjectAnimator sizePercentBy(int sizePercentBy) {
public ViewPropertyObjectAnimator sizePercentBy(float sizePercentBy) {
if (initPercentListener()){
mPercentListener.sizePercentBy(sizePercentBy);
}
5 changes: 2 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ android {
applicationId "com.bartoszlipinski.viewpropertyobjectanimator.sample"
minSdkVersion 14
targetSdkVersion 23
versionCode 6
versionName "1.4.0"
versionCode 7
versionName "1.4.1"
}
buildTypes {
release {
@@ -23,5 +23,4 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':library')
compile 'com.android.support:appcompat-v7:23.1.1'
compile "com.android.support:percent:23.1.1"
}

0 comments on commit a1b3cef

Please sign in to comment.