Setting content bounds in onMeasure as it uses measuredWidth, which might

not be available during onCreate

Also fixing the calculation of allApps column could, which was counting an
additional icon gap

Bug: 27173894
Change-Id: I8be8cccc76d7e7d945cf9383567a3026228b6c86
This commit is contained in:
Sunny Goyal
2016-02-16 14:56:33 -08:00
parent 187b8f547d
commit 94f46d9e5f
3 changed files with 9 additions and 7 deletions

View File

@@ -38,10 +38,8 @@ public abstract class BaseContainerView extends FrameLayout implements Insettabl
// The bounds of the search bar. Only the left, top, right are used to inset the
// search bar and the height is determined by the measurement of the layout
private final Rect mFixedSearchBarBounds = new Rect();
// The computed bounds of the container
protected final Rect mContentBounds = new Rect();
// The computed padding to apply to the container to achieve the container bounds
private final Rect mContentPadding = new Rect();
protected final Rect mContentPadding = new Rect();
// The inset to apply to the edges and between the search bar and the container
private final int mContainerBoundsInset;
@@ -126,9 +124,6 @@ public abstract class BaseContainerView extends FrameLayout implements Insettabl
// The container padding changed, notify the container.
if (!padding.equals(mContentPadding)) {
mContentPadding.set(padding);
mContentBounds.set(padding.left, padding.top,
getMeasuredWidth() - padding.right,
getMeasuredHeight() - padding.bottom);
onUpdateBackgroundAndPaddings(padding);
}
}