Merge "Get rid of spring loaded mode for home gardening design" into tm-qpr-dev am: ee5827d96e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20191502 Change-Id: Iddfb8bff05991795dba060de3f28a7e1c291e42a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.launcher3;
|
||||
import static android.animation.ValueAnimator.areAnimatorsEnabled;
|
||||
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5;
|
||||
import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING;
|
||||
import static com.android.launcher3.dragndrop.DraggableView.DRAGGABLE_ICON;
|
||||
import static com.android.launcher3.icons.IconNormalizer.ICON_VISIBLE_AREA_FACTOR;
|
||||
|
||||
@@ -552,7 +553,9 @@ public class CellLayout extends ViewGroup {
|
||||
public void setSpringLoadedProgress(float progress) {
|
||||
if (Float.compare(progress, mSpringLoadedProgress) != 0) {
|
||||
mSpringLoadedProgress = progress;
|
||||
updateBgAlpha();
|
||||
if (!SHOW_HOME_GARDENING.get()) {
|
||||
updateBgAlpha();
|
||||
}
|
||||
setGridAlpha(progress);
|
||||
}
|
||||
}
|
||||
@@ -577,7 +580,9 @@ public class CellLayout extends ViewGroup {
|
||||
public void setScrollProgress(float progress) {
|
||||
if (Float.compare(Math.abs(progress), mScrollProgress) != 0) {
|
||||
mScrollProgress = Math.abs(progress);
|
||||
updateBgAlpha();
|
||||
if (!SHOW_HOME_GARDENING.get()) {
|
||||
updateBgAlpha();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -616,7 +621,7 @@ public class CellLayout extends ViewGroup {
|
||||
}
|
||||
}
|
||||
|
||||
if (mVisualizeDropLocation) {
|
||||
if (mVisualizeDropLocation && !SHOW_HOME_GARDENING.get()) {
|
||||
for (int i = 0; i < mDragOutlines.length; i++) {
|
||||
final float alpha = mDragOutlineAlphas[i];
|
||||
if (alpha <= 0) continue;
|
||||
|
||||
@@ -107,7 +107,6 @@ import com.android.launcher3.util.PackageUserKey;
|
||||
import com.android.launcher3.util.RunnableList;
|
||||
import com.android.launcher3.util.Thunk;
|
||||
import com.android.launcher3.util.WallpaperOffsetInterpolator;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetHost;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetHost.ProviderChangedListener;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetHostView;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.launcher3.states;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_HOME;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -44,6 +45,11 @@ public class SpringLoadedState extends LauncherState {
|
||||
|
||||
@Override
|
||||
public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) {
|
||||
|
||||
if (SHOW_HOME_GARDENING.get()) {
|
||||
return super.getWorkspaceScaleAndTranslation(launcher);
|
||||
}
|
||||
|
||||
DeviceProfile grid = launcher.getDeviceProfile();
|
||||
Workspace<?> ws = launcher.getWorkspace();
|
||||
if (ws.getChildCount() == 0) {
|
||||
@@ -62,6 +68,9 @@ public class SpringLoadedState extends LauncherState {
|
||||
|
||||
@Override
|
||||
protected float getDepthUnchecked(Context context) {
|
||||
if (SHOW_HOME_GARDENING.get()) {
|
||||
return 0;
|
||||
}
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
@@ -72,6 +81,10 @@ public class SpringLoadedState extends LauncherState {
|
||||
|
||||
@Override
|
||||
public float getWorkspaceBackgroundAlpha(Launcher launcher) {
|
||||
if (SHOW_HOME_GARDENING.get()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user