mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Set GroupedTaskView child thumbnails in onMeasure
* Also add indicator if split was originally started in portrait of landscape, so we know which dimension of the divider bar to use if user goes to overview and then rotates device (horizontal divider vs vertical) Fixes: 199461137 Test: Swipe to overview with staged split Rotate device with and without live tile Doesn't overlap with overview actions Change-Id: I8b7f104f16d5b7265828f1b3d98ba3426b28d44f
This commit is contained in:
@@ -93,7 +93,13 @@ public final class SplitConfigurationOptions {
|
||||
// This class is orientation-agnostic, so we compute both for later use
|
||||
public final float topTaskPercent;
|
||||
public final float leftTaskPercent;
|
||||
|
||||
/**
|
||||
* If {@code true}, that means at the time of creation of this object, the
|
||||
* split-screened apps were vertically stacked. This is useful in scenarios like
|
||||
* rotation where the bounds won't change, but this variable can indicate what orientation
|
||||
* the bounds were originally in
|
||||
*/
|
||||
public final boolean appsStackedVertically;
|
||||
|
||||
public StagedSplitBounds(Rect leftTopBounds, Rect rightBottomBounds) {
|
||||
this.leftTopBounds = leftTopBounds;
|
||||
@@ -103,10 +109,12 @@ public final class SplitConfigurationOptions {
|
||||
// vertical apps, horizontal divider
|
||||
this.visualDividerBounds = new Rect(leftTopBounds.left, leftTopBounds.bottom,
|
||||
leftTopBounds.right, rightBottomBounds.top);
|
||||
appsStackedVertically = true;
|
||||
} else {
|
||||
// horizontal apps, vertical divider
|
||||
this.visualDividerBounds = new Rect(leftTopBounds.right, leftTopBounds.top,
|
||||
rightBottomBounds.left, leftTopBounds.bottom);
|
||||
appsStackedVertically = false;
|
||||
}
|
||||
|
||||
leftTaskPercent = this.leftTopBounds.width() / (float) rightBottomBounds.right;
|
||||
|
||||
Reference in New Issue
Block a user