am c2063e18: am 39e15503: am cdc03eb4: Merge "DesignTime: Compute the size of the collapsed text correctly from start." into mnc-dev

* commit 'c2063e188ad779fc8672e1cd10281a8b66cda988':
  DesignTime: Compute the size of the collapsed text correctly from start.

GitOrigin-RevId=d93aa96d14039ef51474dfc980b8ca5379686e02

PiperOrigin-RevId: 140548925
This commit is contained in:
Chris Banes 2016-11-30 01:20:47 +00:00 committed by Travis Collins
parent 7f9d8779a7
commit fd85cc27a5

View File

@ -312,6 +312,12 @@ public class CollapsingToolbarLayout extends FrameLayout {
mRefreshToolbar = false;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
ensureToolbar();
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
@ -332,8 +338,6 @@ public class CollapsingToolbarLayout extends FrameLayout {
getViewOffsetHelper(child).onViewLayout();
}
ensureToolbar();
// Update the collapsed bounds by getting it's transformed bounds
if (mDummyView != null) {
ViewGroupUtils.getDescendantRect(this, mDummyView, mTmpRect);