From e0c332365604976d999eb25d4bdcc49ec75b7a1c Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Mon, 8 Feb 2016 11:37:04 -0800 Subject: Tweak spring-loaded workspace. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - No page indicators in spring-loaded mode - Don’t move workspace up as high - Scale workspace at 90% instead of 80% on phones - Increase speed of workspace -> spring-loaded -> workspace - Widgets were being scaled down twice when dragging from widget picker - Don't scale up icons when dragging (scaling other stuff down is enough) - Make scrim less dark and panels more transparent - Thin white border around page instead of highlight when hovering Change-Id: I963e91c20d4c0340480d165e0f3b8064783c0cb2 --- src/com/android/launcher3/dragndrop/DragView.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/com/android/launcher3/dragndrop/DragView.java') diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java index 01189d0e9..b1df41b9d 100644 --- a/src/com/android/launcher3/dragndrop/DragView.java +++ b/src/com/android/launcher3/dragndrop/DragView.java @@ -39,6 +39,7 @@ import android.view.animation.DecelerateInterpolator; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAnimUtils; import com.android.launcher3.Utilities; +import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.util.Thunk; import com.android.launcher3.R; @@ -84,15 +85,15 @@ public class DragView extends View { */ @TargetApi(Build.VERSION_CODES.LOLLIPOP) public DragView(Launcher launcher, Bitmap bitmap, int registrationX, int registrationY, - int left, int top, int width, int height, final float initialScale, - float finalDragViewScale) { + int left, int top, int width, int height, final float initialScale) { super(launcher); mDragLayer = launcher.getDragLayer(); mDragController = launcher.getDragController(); final Resources res = getResources(); - final float scaleDps = res.getDimensionPixelSize(R.dimen.dragViewScale); - final float scale = finalDragViewScale * (width + scaleDps) / width; + final float scaleDps = !FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND ? 0f + : res.getDimensionPixelSize(R.dimen.dragViewScale); + final float scale = (width + scaleDps) / width; // Set the initial scale to avoid any jumps setScaleX(initialScale); -- cgit v1.2.3