@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, widthMeasureSpec); } }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, widthMeasureSpec); } }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, widthMeasureSpec); } }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { //noinspection SuspiciousNameCombination super.onMeasure(widthMeasureSpec, widthMeasureSpec); }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, widthMeasureSpec); }
@Override protected void onMeasure(final int widthMeasureSpec, int heightMeasureSpec) { // if this TextView is collapsed and maxLines = 0, // than make its height equals to zero if (this.maxLines == 0 && !this.expanded && !this.animating) { heightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.EXACTLY); } super.onMeasure(widthMeasureSpec, heightMeasureSpec); }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { if (delegate != null && delegate.getWidthHeightEqualEnable() && getWidth() > 0 && getHeight() > 0) { int max = Math.max(getWidth(), getHeight()); int measureSpec = MeasureSpec.makeMeasureSpec(max, MeasureSpec.EXACTLY); super.onMeasure(measureSpec, measureSpec); return; } super.onMeasure(widthMeasureSpec, heightMeasureSpec); }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); breakManually(this, getEditableText()); } }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { final int availWidth = MeasureSpec.getSize(widthMeasureSpec) - getPaddingLeft() - getPaddingRight(); updateVisibleText(availWidth, MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED); super.onMeasure(widthMeasureSpec, heightMeasureSpec); }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); if(isCircle) { int measuredWidth = getMeasuredWidth(); int measuredHeight = getMeasuredHeight(); int max = Math.max(measuredWidth, measuredHeight); setMeasuredDimension(max, max); } }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); mWidth = getMeasuredWidth(); mHeight = getMeasuredHeight(); Paint.FontMetricsInt fontMetrics = paint.getFontMetricsInt(); baseline = (mHeight - fontMetrics.bottom + fontMetrics.top) / 2 - fontMetrics.top; }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { setMaxLines(Integer.MAX_VALUE); super.onMeasure(widthMeasureSpec, heightMeasureSpec); assert mProfile != null : "setProfile() must be called before layout."; String urlText = getText().toString(); // Lay out the URL in a StaticLayout that is the same size as our final // container. int originEndIndex = OmniboxUrlEmphasizer.getOriginEndIndex(urlText, mProfile); // Find the range of lines containing the origin. int originEndLine = getLineForIndex(originEndIndex); // Display an extra line so we don't accidentally hide the origin with // ellipses mTruncatedUrlLinesToDisplay = originEndLine + 1; // Find the line where the fragment starts. Since # is a reserved character, it is safe // to just search for the first # to appear in the url. int fragmentStartIndex = urlText.indexOf('#'); if (fragmentStartIndex == -1) fragmentStartIndex = urlText.length(); int fragmentStartLine = getLineForIndex(fragmentStartIndex); mFullLinesToDisplay = fragmentStartLine + 1; // If there is no origin (according to OmniboxUrlEmphasizer), make sure the fragment is // still hidden correctly. if (mFullLinesToDisplay < mTruncatedUrlLinesToDisplay) { mTruncatedUrlLinesToDisplay = mFullLinesToDisplay; } if (updateMaxLines()) super.onMeasure(widthMeasureSpec, heightMeasureSpec); }