summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop/DragView.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-02-08 11:37:04 -0800
committerTony Wickham <twickham@google.com>2016-02-08 11:37:19 -0800
commite0c332365604976d999eb25d4bdcc49ec75b7a1c (patch)
tree5f7a903ecf9bec5b5c902de95e1b79448a738a15 /src/com/android/launcher3/dragndrop/DragView.java
parent3c4906949f9d7a978caa5ffe9dfe8e6e153876ef (diff)
downloadandroid_packages_apps_Trebuchet-e0c332365604976d999eb25d4bdcc49ec75b7a1c.tar.gz
android_packages_apps_Trebuchet-e0c332365604976d999eb25d4bdcc49ec75b7a1c.tar.bz2
android_packages_apps_Trebuchet-e0c332365604976d999eb25d4bdcc49ec75b7a1c.zip
Tweak spring-loaded workspace.
- 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
Diffstat (limited to 'src/com/android/launcher3/dragndrop/DragView.java')
-rw-r--r--src/com/android/launcher3/dragndrop/DragView.java9
1 files changed, 5 insertions, 4 deletions
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);