Decouple the scaling / translation of widget views necessary in split-screen
=> We pull apart the scale and translation that are set in a fairly
static way due to split-screen vs. the general translation and scale
properties that might be used more dynamically, in this case
for re-order animations
=> This allows removal of some code that breaks reorder animations
due to the accrual of translations / scales in certain edge cases.
=> TODO in future CL: address other translation cases and make the throw
case for calling base setTranslationX/Y for Workspace Items unconditional
issue 149438360
test: manual
Change-Id: Ic3fde172f669e215cd25db0fcd4e1c3c873d314f
diff --git a/src/com/android/launcher3/Reorderable.java b/src/com/android/launcher3/Reorderable.java
new file mode 100644
index 0000000..5112eaf
--- /dev/null
+++ b/src/com/android/launcher3/Reorderable.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.launcher3;
+
+import android.graphics.PointF;
+import android.view.View;
+
+public interface Reorderable {
+
+ /**
+ * Set the offset related to reorder hint and "bounce" animations
+ */
+ void setReorderOffset(float x, float y);
+
+ void getReorderOffset(PointF offset);
+
+ /**
+ * Set the scale related to reorder hint and "bounce" animations
+ */
+ void setReorderScale(float scale);
+ float getReorderScale();
+
+ /**
+ * Get the com.android.view related to this object
+ */
+ View getView();
+}