Fix bug where floating icon and workspace icon visible at the same time.

- Add a signal for the animation to be "cancelled"
- Allow the workspace view to be attached to a spring during the animatoin
  (but kept hidden) to prevent any jumpy movement

Bug: 137215697
Change-Id: Ie6868a7f45fefaee5366c8d30bb323fe042e9156
This commit is contained in:
Jon Miranda
2019-07-10 14:14:23 -07:00
parent ddf64806e2
commit cabbaf986c
4 changed files with 76 additions and 30 deletions

View File

@@ -656,8 +656,7 @@ public class FloatingIconView extends View implements
canvas.restoreToCount(count);
}
public void onListenerViewClosed() {
// Fast finish here.
public void fastFinish() {
if (mEndRunnable != null) {
mEndRunnable.run();
mEndRunnable = null;
@@ -757,7 +756,7 @@ public class FloatingIconView extends View implements
view.setVisibility(INVISIBLE);
parent.addView(view);
dragLayer.addView(view.mListenerView);
view.mListenerView.setListener(view::onListenerViewClosed);
view.mListenerView.setListener(view::fastFinish);
view.mEndRunnable = () -> {
view.mEndRunnable = null;