diff --git a/bottom-bar/src/main/java/com/roughike/bottombar/BottomBarTab.java b/bottom-bar/src/main/java/com/roughike/bottombar/BottomBarTab.java index 9ddb230f..d33e1e30 100644 --- a/bottom-bar/src/main/java/com/roughike/bottombar/BottomBarTab.java +++ b/bottom-bar/src/main/java/com/roughike/bottombar/BottomBarTab.java @@ -1,7 +1,5 @@ package com.roughike.bottombar; -import android.animation.Animator; -import android.animation.AnimatorListenerAdapter; import android.animation.ArgbEvaluator; import android.animation.ValueAnimator; import android.content.Context; @@ -493,15 +491,19 @@ public void onAnimationUpdate(ValueAnimator animator) { setLayoutParams(params); } }); - animator.addListener(new AnimatorListenerAdapter() { + + // Workaround to avoid using faulty onAnimationEnd() listener + postDelayed(new Runnable() { @Override - public void onAnimationEnd(Animator animation) { + public void run() { if (!isActive && badge != null) { + clearAnimation(); badge.adjustPositionAndSize(BottomBarTab.this); badge.show(); } } - }); + }, animator.getDuration()); + animator.start(); } diff --git a/build.gradle b/build.gradle index 9fdfa3a9..0cbde521 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ ext { buildToolsVersion = "25.0.2" minSdkVersion = 11 targetSdkVersion = 25 - supportLibraryVersion = "25.3.0" + supportLibraryVersion = "25.3.1" junitVersion = "4.12" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9cd61e61..def76e4f 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-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip