mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 16:00:02 +00:00
committed by
Moxie Marlinspike
parent
bc787f20e3
commit
44df1128af
@@ -26,6 +26,7 @@ public class HidingImageButton extends ImageButton {
|
||||
}
|
||||
|
||||
public void hide() {
|
||||
if (!isEnabled()) return;
|
||||
final Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.slide_to_right);
|
||||
animation.setAnimationListener(new AnimationListener() {
|
||||
@Override public void onAnimationStart(Animation animation) {}
|
||||
@@ -38,6 +39,7 @@ public class HidingImageButton extends ImageButton {
|
||||
}
|
||||
|
||||
public void show() {
|
||||
if (!isEnabled()) return;
|
||||
setVisibility(VISIBLE);
|
||||
animateWith(AnimationUtils.loadAnimation(getContext(), R.anim.slide_from_right));
|
||||
}
|
||||
@@ -47,4 +49,9 @@ public class HidingImageButton extends ImageButton {
|
||||
animation.setInterpolator(new FastOutSlowInInterpolator());
|
||||
startAnimation(animation);
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
setVisibility(GONE);
|
||||
setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user