File tree Expand file tree Collapse file tree 7 files changed +23
-13
lines changed
src/main/java/com/bartoszlipinski/viewpropertyobjectanimator Expand file tree Collapse file tree 7 files changed +23
-13
lines changed Original file line number Diff line number Diff line change 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+
17Version 1.4.0 * (2015-12-14)*
28----------------------------
39
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
4242
4343``` xml
4444dependencies {
45- compile 'com.bartoszlipinski:viewpropertyobjectanimator:1.4.0 '
45+ compile 'com.bartoszlipinski:viewpropertyobjectanimator:1.4.1 '
4646}
4747```
4848
Original file line number Diff line number Diff line change 1- VERSION_NAME =1.4.0
2- VERSION_CODE =6
1+ VERSION_NAME =1.4.1
2+ VERSION_CODE =7
33GROUP =com.bartoszlipinski
44
55POM_DESCRIPTION =Wrapper of the ObjectAnimator that can be used similarly to ViewPropertyAnimator
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments