mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 813057 - Ensure suggestion view parameters are reset if view is removed during animation. r=lucasr
This commit is contained in:
parent
30a1193af7
commit
be5e4e465d
@ -40,8 +40,7 @@ public class AnimatedHeightLayout extends RelativeLayout {
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
post(new Runnable() {
|
||||
public void run() {
|
||||
getLayoutParams().height = LayoutParams.WRAP_CONTENT;
|
||||
mAnimating = false;
|
||||
finishAnimation();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -49,4 +48,17 @@ public class AnimatedHeightLayout extends RelativeLayout {
|
||||
startAnimation(anim);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
finishAnimation();
|
||||
}
|
||||
|
||||
private void finishAnimation() {
|
||||
if (mAnimating) {
|
||||
getLayoutParams().height = LayoutParams.WRAP_CONTENT;
|
||||
mAnimating = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user