Add funtional animation for SplitSelect from Grid.

Long ways to go to final UI - TODO(b/186800707)
Add comments to grid layout code,
no functional changes at all.

Bug: 181705607
Test: Enter split screen from overview task menu
in grid and carousel. Able to select all items
and enter split.

Change-Id: Ib62f1b286acf0781ec47862fa31b670e6ff1892a
This commit is contained in:
Vinit Nayak
2021-04-29 18:37:48 -07:00
parent 13e4618b57
commit 2dbdddb4ba
9 changed files with 255 additions and 75 deletions
@@ -25,6 +25,7 @@ import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITIO
import android.animation.AnimatorSet;
import android.app.ActivityOptions;
import android.content.res.Resources;
import android.graphics.Rect;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -64,6 +65,7 @@ public class SplitSelectStateController {
private final SystemUiProxy mSystemUiProxy;
private TaskView mInitialTaskView;
private SplitPositionOption mInitialPosition;
private Rect mInitialBounds;
private final Handler mHandler;
public SplitSelectStateController(Handler handler, SystemUiProxy systemUiProxy) {
@@ -74,9 +76,11 @@ public class SplitSelectStateController {
/**
* To be called after first task selected
*/
public void setInitialTaskSelect(TaskView taskView, SplitPositionOption positionOption) {
public void setInitialTaskSelect(TaskView taskView, SplitPositionOption positionOption,
Rect initialBounds) {
mInitialTaskView = taskView;
mInitialPosition = positionOption;
mInitialBounds = initialBounds;
}
/**
@@ -220,9 +224,14 @@ public class SplitSelectStateController {
public void resetState() {
mInitialTaskView = null;
mInitialPosition = null;
mInitialBounds = null;
}
public boolean isSplitSelectActive() {
return mInitialTaskView != null;
}
public Rect getInitialBounds() {
return mInitialBounds;
}
}