Fix split select scroll range when TaskView aren't shifting
- There is an edge case that when ClearAllButton is visible, no split translation is applied, the offset adjustment needs to be calculated differently in that case - Also, apply the scrollOffset to the TaskViews / ClearAllButton instead of updating min/max scroll Bug: 200537659 Test: Split right in grid, split left with clear all button, split left without clear all button Change-Id: I869c448bbec6aec8fa070e47193a692be6f75e84
This commit is contained in:
@@ -389,6 +389,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
// Used when in SplitScreenSelectState
|
||||
private float mSplitSelectTranslationY;
|
||||
private float mSplitSelectTranslationX;
|
||||
private float mSplitSelectScrollOffsetPrimary;
|
||||
|
||||
private ObjectAnimator mIconAndDimAnimator;
|
||||
private float mIconScaleAnimStartProgress = 0;
|
||||
@@ -1031,6 +1032,11 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
mSplitSelectTranslationY = y;
|
||||
applyTranslationY();
|
||||
}
|
||||
|
||||
public void setSplitScrollOffsetPrimary(float splitSelectScrollOffsetPrimary) {
|
||||
mSplitSelectScrollOffsetPrimary = splitSelectScrollOffsetPrimary;
|
||||
}
|
||||
|
||||
private void setDismissTranslationX(float x) {
|
||||
mDismissTranslationX = x;
|
||||
applyTranslationX();
|
||||
@@ -1101,6 +1107,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
} else {
|
||||
scrollAdjustment += getPrimaryNonGridTranslationProperty().get(this);
|
||||
}
|
||||
scrollAdjustment += mSplitSelectScrollOffsetPrimary;
|
||||
return scrollAdjustment;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user