Lines Matching refs:params

451                 LayoutParams params = (LayoutParams) child.getLayoutParams();
452 int[] rules = params.getRules(layoutDirection);
454 applyHorizontalSizeRules(params, myWidth, rules);
455 measureChildHorizontal(child, params, myWidth, myHeight);
457 if (positionChildHorizontal(child, params, myWidth, isWrapContentWidth)) {
470 LayoutParams params = (LayoutParams) child.getLayoutParams();
472 applyVerticalSizeRules(params, myHeight);
473 measureChild(child, params, myWidth, myHeight);
474 if (positionChildVertical(child, params, myHeight, isWrapContentHeight)) {
481 width = Math.max(width, myWidth - params.mLeft);
483 width = Math.max(width, myWidth - params.mLeft - params.leftMargin);
487 width = Math.max(width, params.mRight);
489 width = Math.max(width, params.mRight + params.rightMargin);
496 height = Math.max(height, params.mBottom);
498 height = Math.max(height, params.mBottom + params.bottomMargin);
503 left = Math.min(left, params.mLeft - params.leftMargin);
504 top = Math.min(top, params.mTop - params.topMargin);
508 right = Math.max(right, params.mRight + params.rightMargin);
509 bottom = Math.max(bottom, params.mBottom + params.bottomMargin);
518 LayoutParams params = (LayoutParams) child.getLayoutParams();
519 alignBaseline(child, params);
522 left = Math.min(left, params.mLeft - params.leftMargin);
523 top = Math.min(top, params.mTop - params.topMargin);
527 right = Math.max(right, params.mRight + params.rightMargin);
528 bottom = Math.max(bottom, params.mBottom + params.bottomMargin);
550 LayoutParams params = (LayoutParams) child.getLayoutParams();
551 final int[] rules = params.getRules(layoutDirection);
553 centerHorizontal(child, params, width);
556 params.mLeft = width - mPaddingRight - childWidth;
557 params.mRight = params.mLeft + childWidth;
580 LayoutParams params = (LayoutParams) child.getLayoutParams();
581 final int[] rules = params.getRules(layoutDirection);
583 centerVertical(child, params, height);
586 params.mTop = height - mPaddingBottom - childHeight;
587 params.mBottom = params.mTop + childHeight;
609 LayoutParams params = (LayoutParams) child.getLayoutParams();
611 params.mLeft += horizontalOffset;
612 params.mRight += horizontalOffset;
615 params.mTop += verticalOffset;
616 params.mBottom += verticalOffset;
628 LayoutParams params = (LayoutParams) child.getLayoutParams();
629 params.mLeft -= offsetWidth;
630 params.mRight -= offsetWidth;
639 private void alignBaseline(View child, LayoutParams params) {
641 int[] rules = params.getRules(layoutDirection);
652 int height = params.mBottom - params.mTop;
653 params.mTop = offset;
654 params.mBottom = params.mTop + height;
662 if (params.mTop < lp.mTop || (params.mTop == lp.mTop && params.mLeft < lp.mLeft)) {
674 * @param params LayoutParams associated with child
678 private void measureChild(View child, LayoutParams params, int myWidth, int myHeight) {
679 int childWidthMeasureSpec = getChildMeasureSpec(params.mLeft,
680 params.mRight, params.width,
681 params.leftMargin, params.rightMargin,
684 int childHeightMeasureSpec = getChildMeasureSpec(params.mTop,
685 params.mBottom, params.height,
686 params.topMargin, params.bottomMargin,
692 private void measureChildHorizontal(View child, LayoutParams params, int myWidth, int myHeight) {
693 int childWidthMeasureSpec = getChildMeasureSpec(params.mLeft,
694 params.mRight, params.width,
695 params.leftMargin, params.rightMargin,
701 params.topMargin - params.bottomMargin);
705 if (params.height >= 0) {
707 params.height, MeasureSpec.EXACTLY);
714 } else if (params.width == LayoutParams.MATCH_PARENT) {
727 * @param childStart The left or top field of the child's layout params
728 * @param childEnd The right or bottom field of the child's layout params
730 * the child's layout params)
811 private boolean positionChildHorizontal(View child, LayoutParams params, int myWidth,
815 int[] rules = params.getRules(layoutDirection);
817 if (params.mLeft < 0 && params.mRight >= 0) {
819 params.mLeft = params.mRight - child.getMeasuredWidth();
820 } else if (params.mLeft >= 0 && params.mRight < 0) {
822 params.mRight = params.mLeft + child.getMeasuredWidth();
823 } else if (params.mLeft < 0 && params.mRight < 0) {
827 centerHorizontal(child, params, myWidth);
829 params.mLeft = mPaddingLeft + params.leftMargin;
830 params.mRight = params.mLeft + child.getMeasuredWidth();
837 params.mRight = myWidth - mPaddingRight- params.rightMargin;
838 params.mLeft = params.mRight - child.getMeasuredWidth();
840 params.mLeft = mPaddingLeft + params.leftMargin;
841 params.mRight = params.mLeft + child.getMeasuredWidth();
848 private boolean positionChildVertical(View child, LayoutParams params, int myHeight,
851 int[] rules = params.getRules();
853 if (params.mTop < 0 && params.mBottom >= 0) {
855 params.mTop = params.mBottom - child.getMeasuredHeight();
856 } else if (params.mTop >= 0 && params.mBottom < 0) {
858 params.mBottom = params.mTop + child.getMeasuredHeight();
859 } else if (params.mTop < 0 && params.mBottom < 0) {
863 centerVertical(child, params, myHeight);
865 params.mTop = mPaddingTop + params.topMargin;
866 params.mBottom = params.mTop + child.getMeasuredHeight();
870 params.mTop = mPaddingTop + params.topMargin;
871 params.mBottom = params.mTop + child.getMeasuredHeight();
1012 ViewGroup.LayoutParams params = v.getLayoutParams();
1013 if (params instanceof LayoutParams) {
1028 private static void centerHorizontal(View child, LayoutParams params, int myWidth) {
1032 params.mLeft = left;
1033 params.mRight = left + childWidth;
1036 private static void centerVertical(View child, LayoutParams params, int myHeight) {
1040 params.mTop = top;
1041 params.mBottom = top + childHeight;
1341 * @param source The layout params to copy from.