mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-22 17:48:28 +00:00
fix image button repeating animation incorrectly
Closes #3610 // FREEBIE
This commit is contained in:
parent
d400f0fb58
commit
7593918006
@ -26,7 +26,7 @@ public class HidingImageButton extends ImageButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void hide() {
|
public void hide() {
|
||||||
if (!isEnabled()) return;
|
if (!isEnabled() || getVisibility() == GONE) return;
|
||||||
final Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.slide_to_right);
|
final Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.slide_to_right);
|
||||||
animation.setAnimationListener(new AnimationListener() {
|
animation.setAnimationListener(new AnimationListener() {
|
||||||
@Override public void onAnimationStart(Animation animation) {}
|
@Override public void onAnimationStart(Animation animation) {}
|
||||||
@ -39,7 +39,7 @@ public class HidingImageButton extends ImageButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void show() {
|
public void show() {
|
||||||
if (!isEnabled()) return;
|
if (!isEnabled() || getVisibility() == VISIBLE) return;
|
||||||
setVisibility(VISIBLE);
|
setVisibility(VISIBLE);
|
||||||
animateWith(AnimationUtils.loadAnimation(getContext(), R.anim.slide_from_right));
|
animateWith(AnimationUtils.loadAnimation(getContext(), R.anim.slide_from_right));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user