fix image button repeating animation incorrectly

Closes #3610
// FREEBIE
fork-5.53.8
Jake McGinty 2015-07-10 18:15:34 -07:00 zatwierdzone przez Moxie Marlinspike
rodzic d400f0fb58
commit 7593918006
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -26,7 +26,7 @@ public class HidingImageButton extends ImageButton {
}
public void hide() {
if (!isEnabled()) return;
if (!isEnabled() || getVisibility() == GONE) return;
final Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.slide_to_right);
animation.setAnimationListener(new AnimationListener() {
@Override public void onAnimationStart(Animation animation) {}
@ -39,7 +39,7 @@ public class HidingImageButton extends ImageButton {
}
public void show() {
if (!isEnabled()) return;
if (!isEnabled() || getVisibility() == VISIBLE) return;
setVisibility(VISIBLE);
animateWith(AnimationUtils.loadAnimation(getContext(), R.anim.slide_from_right));
}