Launcher shortcuts animations update.

> The shortcut container closes with an animation
> When opening/closing the animation only the icon scales
and not the title and drag handle
> When dragging the icon, it starts from the original icon position and
moves under the user finger. The container grows to follow the drag view.

Bug: 28980830
Change-Id: Ic0353c30b682d1f018cbf4d62e8a6e8e7d7d4664
This commit is contained in:
Sunny Goyal committed 2016-07-27 17:37:23 -07:00
1 parent 71538da6e2
commit a2454ad2d8
15 files changed
+456 -163

No files matched your search

@@ -21,7 +21,6 @@ import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.R;
/**
* A {@link BubbleTextView} that has the shortcut icon on the left and drag handle on the right.
@@ -41,10 +40,7 @@ public class DeepShortcutTextView extends BubbleTextView {
}
@Override
/** Use the BubbleTextView icon for the start and the drag handle for the end. */
protected void applyCompoundDrawables(Drawable icon) {
Drawable dragHandle = getResources().getDrawable(R.drawable.deep_shortcuts_drag_handle);
dragHandle.setBounds(0, 0, dragHandle.getIntrinsicWidth(), dragHandle.getIntrinsicHeight());
setCompoundDrawablesRelative(icon, null, dragHandle, null);
// The icon is drawn in a separate view.
}
}