summaryrefslogtreecommitdiffstats
path: root/go
diff options
context:
space:
mode:
authorTony <twickham@google.com>2019-03-15 16:55:53 -0500
committerTony <twickham@google.com>2019-03-20 15:36:31 -0500
commitbfc9dde03eef8756c439f62eee690b0fcf396c5c (patch)
tree26bf767158f7bf2a3c9692ee3c5397b52ab19296 /go
parenta761a0d585ddca2bcb9a2918c79ba61fcb4a0cc6 (diff)
downloadandroid_packages_apps_Trebuchet-bfc9dde03eef8756c439f62eee690b0fcf396c5c.tar.gz
android_packages_apps_Trebuchet-bfc9dde03eef8756c439f62eee690b0fcf396c5c.tar.bz2
android_packages_apps_Trebuchet-bfc9dde03eef8756c439f62eee690b0fcf396c5c.zip
Replace translationYFactor with just translationY
Now that we don't have quick scrub, the only state that has a non-zero translation is all apps, which just uses that to have a slight parallax. This is much simpler to define in terms of pixels like other states do. Change-Id: I108c8505d85591399256b3475f7566ff51e2c5ad
Diffstat (limited to 'go')
-rw-r--r--go/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java2
-rw-r--r--go/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java10
-rw-r--r--go/quickstep/src/com/android/quickstep/views/IconRecentsView.java24
3 files changed, 3 insertions, 33 deletions
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java b/go/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java
index 5382607a1..cec12a8d1 100644
--- a/go/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java
+++ b/go/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java
@@ -43,7 +43,7 @@ public class OverviewState extends LauncherState {
}
@Override
- public float[] getOverviewScaleAndTranslationYFactor(Launcher launcher) {
+ public float[] getOverviewScaleAndTranslationY(Launcher launcher) {
return new float[] {1f, 0f};
}
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/go/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
index 784af7d11..0b12ab052 100644
--- a/go/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
+++ b/go/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
@@ -16,16 +16,15 @@
package com.android.launcher3.uioverrides;
import static com.android.quickstep.views.IconRecentsView.CONTENT_ALPHA;
-import static com.android.quickstep.views.IconRecentsView.TRANSLATION_Y_FACTOR;
import android.util.FloatProperty;
-import androidx.annotation.NonNull;
-
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherRecentsToActivityHelper;
import com.android.quickstep.views.IconRecentsView;
+import androidx.annotation.NonNull;
+
/**
* State handler for Go's {@link IconRecentsView}.
*/
@@ -39,11 +38,6 @@ public final class RecentsViewStateController extends
}
@Override
- FloatProperty<IconRecentsView> getTranslationYFactorProperty() {
- return TRANSLATION_Y_FACTOR;
- }
-
- @Override
FloatProperty<IconRecentsView> getContentAlphaProperty() {
return CONTENT_ALPHA;
}
diff --git a/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java b/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
index 3fdaefe15..504f64006 100644
--- a/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
+++ b/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
@@ -46,20 +46,6 @@ import com.android.quickstep.TaskSwipeCallback;
*/
public final class IconRecentsView extends FrameLayout {
- public static final FloatProperty<IconRecentsView> TRANSLATION_Y_FACTOR =
- new FloatProperty<IconRecentsView>("translationYFactor") {
-
- @Override
- public void setValue(IconRecentsView view, float v) {
- view.setTranslationYFactor(v);
- }
-
- @Override
- public Float get(IconRecentsView view) {
- return view.mTranslationYFactor;
- }
- };
-
public static final FloatProperty<IconRecentsView> CONTENT_ALPHA =
new FloatProperty<IconRecentsView>("contentAlpha") {
@Override
@@ -91,7 +77,6 @@ public final class IconRecentsView extends FrameLayout {
private final TaskInputController mTaskInputController;
private RecentsToActivityHelper mActivityHelper;
- private float mTranslationYFactor;
private RecyclerView mTaskRecyclerView;
private View mEmptyView;
@@ -170,15 +155,6 @@ public final class IconRecentsView extends FrameLayout {
return view.getThumbnailView();
}
- public void setTranslationYFactor(float translationFactor) {
- mTranslationYFactor = translationFactor;
- setTranslationY(computeTranslationYForFactor(mTranslationYFactor));
- }
-
- private float computeTranslationYForFactor(float translationYFactor) {
- return translationYFactor * (getPaddingBottom() - getPaddingTop());
- }
-
/**
* Update the content view so that the appropriate view is shown based off the current list
* of tasks.