@TargetApi(HONEYCOMB) public S hasMeasuredState(int state) { isNotNull(); int actualState = actual.getMeasuredState(); assertThat(actualState) // .overridingErrorMessage("Expected measured state <%s> but was <%s>", state, actualState) // .isEqualTo(state); return myself; }
childState = childState | child.getMeasuredState();
int childState = 0; for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.getVisibility() != GONE) { measureTheChild(child); childState = combineMeasuredStates(childState, child.getMeasuredState()); } }
public static int getMeasuredState(View view) { return view.getMeasuredState(); }
@TargetApi(HONEYCOMB) public S hasMeasuredState(int state) { isNotNull(); int actualState = actual.getMeasuredState(); assertThat(actualState) // .overridingErrorMessage("Expected measured state <%s> but was <%s>", state, actualState) // .isEqualTo(state); return myself; }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int count = getChildCount(); int maxHeight = 0; int maxWidth = 0; int childState = 0; for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.getVisibility() != GONE) { child.measure(widthMeasureSpec, heightMeasureSpec); maxWidth = Math.round(Math.max(maxWidth, child.getMeasuredWidth() * child.getScaleX())); maxHeight = Math.round(Math.max(maxHeight, child.getMeasuredHeight() * child.getScaleY())); childState = combineMeasuredStates(childState, child.getMeasuredState()); } } maxHeight = Math.max(maxHeight, getSuggestedMinimumHeight()); maxWidth = Math.max(maxWidth, getSuggestedMinimumWidth()); setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState), resolveSizeAndState(maxHeight, heightMeasureSpec, childState << MEASURED_HEIGHT_STATE_SHIFT)); }
childState = combineMeasuredStates(childState, child.getMeasuredState());
this.mMeasuredWidth = Math.max(this.mMeasuredWidth, mainView.getMeasuredWidth()); mainHeight += mainView.getMeasuredHeight(); state = View.combineMeasuredStates(state, mainView.getMeasuredState()); infoHeight += infoView.getMeasuredHeight(); state = View.combineMeasuredStates(state, infoView.getMeasuredState()); measureChild(extraView, cardWidthMeasureSpec, unspecifiedSpec); extraHeight += extraView.getMeasuredHeight(); state = View.combineMeasuredStates(state, extraView.getMeasuredState());
childHeight = child.getMeasuredHeight(); if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.ICE_CREAM_SANDWICH) childState = child.getMeasuredState(); mRecycledViews.add(child);
childState = combineMeasuredStates(childState, child.getMeasuredState());
childState = combineMeasuredStates(childState, child.getMeasuredState());
maxHeight = Math.max(maxHeight, child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin); childState = combineMeasuredStates(childState, child.getMeasuredState()); if (measureMatchParentChildren) { if (lp.width == LayoutParams.MATCH_PARENT ||
childState = combineMeasuredStates(childState, subView.getMeasuredState()); setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState), resolveSizeAndState(maxHeight, heightMeasureSpec, maxHeight = Math.max(maxHeight, subView.getMeasuredHeight() + topMargin + bottomMargin); childState = combineMeasuredStates(childState, subView.getMeasuredState()); if (measureMatchParentChildren) { isMatchParent = lp.width == ViewGroup.LayoutParams.MATCH_PARENT ||
childState = combineMeasuredStates( childState, child.getMeasuredState() );
childState = combineMeasuredStates(childState, child.getMeasuredState());
childState = combineMeasuredStates(childState, child.getMeasuredState());
child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin); childState |= child.getMeasuredState();
+ lp.bottomMargin, childHeight); child.measure(childWidthMeasureSpec, childHeightMeasureSpec); childState = combineMeasuredStates(childState, child.getMeasuredState()); largestWidthInColumn = Math.max(largestWidthInColumn, child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin);
childState = childState | child.getMeasuredState();
child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin); childState = combineMeasuredStates(childState, child.getMeasuredState());