Cut the Grid-based Recents title if it's too long.
am: 8f34df423d
Change-Id: I941f6d96bd6dab4c3bf6c09e5dbf4b136407a055
This commit is contained in:
@@ -424,7 +424,7 @@ public class TaskStackAnimationHelper {
|
||||
final ReferenceCountedTrigger postAnimationTrigger) {
|
||||
TaskStackLayoutAlgorithm stackLayout = mStackView.getStackAlgorithm();
|
||||
|
||||
int offscreenXOffset = mStackView.getMeasuredWidth() - stackLayout.mTaskRect.left;
|
||||
int offscreenXOffset = mStackView.getMeasuredWidth() - stackLayout.getTaskRect().left;
|
||||
|
||||
int taskViewCount = taskViews.size();
|
||||
for (int i = taskViewCount - 1; i >= 0; i--) {
|
||||
|
||||
@@ -1320,6 +1320,13 @@ public class TaskStackLayoutAlgorithm {
|
||||
mFrontOfStackTransform.visible = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the proper task rectangle according to the current grid state.
|
||||
*/
|
||||
public Rect getTaskRect() {
|
||||
return mGridState.useGridLayout() ? mTaskGridLayoutAlgorithm.getTaskGridRect() : mTaskRect;
|
||||
}
|
||||
|
||||
public void dump(String prefix, PrintWriter writer) {
|
||||
String innerPrefix = prefix + " ";
|
||||
|
||||
|
||||
@@ -1268,8 +1268,8 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
|
||||
if (tv.getBackground() != null) {
|
||||
tv.getBackground().getPadding(padding);
|
||||
}
|
||||
mTmpRect.set(mStableLayoutAlgorithm.mTaskRect);
|
||||
mTmpRect.union(mLayoutAlgorithm.mTaskRect);
|
||||
mTmpRect.set(mStableLayoutAlgorithm.getTaskRect());
|
||||
mTmpRect.union(mLayoutAlgorithm.getTaskRect());
|
||||
tv.measure(
|
||||
MeasureSpec.makeMeasureSpec(mTmpRect.width() + padding.left + padding.right,
|
||||
MeasureSpec.EXACTLY),
|
||||
@@ -1314,8 +1314,8 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
|
||||
if (tv.getBackground() != null) {
|
||||
tv.getBackground().getPadding(padding);
|
||||
}
|
||||
mTmpRect.set(mStableLayoutAlgorithm.mTaskRect);
|
||||
mTmpRect.union(mLayoutAlgorithm.mTaskRect);
|
||||
mTmpRect.set(mStableLayoutAlgorithm.getTaskRect());
|
||||
mTmpRect.union(mLayoutAlgorithm.getTaskRect());
|
||||
tv.cancelTransformAnimation();
|
||||
tv.layout(mTmpRect.left - padding.left, mTmpRect.top - padding.top,
|
||||
mTmpRect.right + padding.right, mTmpRect.bottom + padding.bottom);
|
||||
|
||||
@@ -195,4 +195,8 @@ public class TaskGridLayoutAlgorithm {
|
||||
buttonRect.bottom = buttonRect.top + mPaddingTopBottom;
|
||||
return buttonRect;
|
||||
}
|
||||
|
||||
public Rect getTaskGridRect() {
|
||||
return mTaskGridRect;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user