Loading core/java/com/android/internal/widget/DialogTitle.java +10 −12 Original line number Diff line number Diff line Loading @@ -53,21 +53,19 @@ public class DialogTitle extends TextView { final int ellipsisCount = layout.getEllipsisCount(lineCount - 1); if (ellipsisCount > 0) { setSingleLine(false); setMaxLines(2); TypedArray a = mContext.obtainStyledAttributes(null, android.R.styleable.TextAppearance, android.R.attr.textAppearanceMedium, final TypedArray a = mContext.obtainStyledAttributes(null, android.R.styleable.TextAppearance, android.R.attr.textAppearanceMedium, android.R.style.TextAppearance_Medium); final int textSize = a.getDimensionPixelSize( android.R.styleable.TextAppearance_textSize, (int) (20 * getResources().getDisplayMetrics().density)); final int textColor = a.getColor( android.R.styleable.TextAppearance_textColor, 0xffffffff); android.R.styleable.TextAppearance_textSize, 0); if (textSize != 0) { // textSize is already expressed in pixels setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); setTextColor(textColor); setMaxLines(2); } a.recycle(); super.onMeasure(widthMeasureSpec, heightMeasureSpec); } } Loading Loading
core/java/com/android/internal/widget/DialogTitle.java +10 −12 Original line number Diff line number Diff line Loading @@ -53,21 +53,19 @@ public class DialogTitle extends TextView { final int ellipsisCount = layout.getEllipsisCount(lineCount - 1); if (ellipsisCount > 0) { setSingleLine(false); setMaxLines(2); TypedArray a = mContext.obtainStyledAttributes(null, android.R.styleable.TextAppearance, android.R.attr.textAppearanceMedium, final TypedArray a = mContext.obtainStyledAttributes(null, android.R.styleable.TextAppearance, android.R.attr.textAppearanceMedium, android.R.style.TextAppearance_Medium); final int textSize = a.getDimensionPixelSize( android.R.styleable.TextAppearance_textSize, (int) (20 * getResources().getDisplayMetrics().density)); final int textColor = a.getColor( android.R.styleable.TextAppearance_textColor, 0xffffffff); android.R.styleable.TextAppearance_textSize, 0); if (textSize != 0) { // textSize is already expressed in pixels setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); setTextColor(textColor); setMaxLines(2); } a.recycle(); super.onMeasure(widthMeasureSpec, heightMeasureSpec); } } Loading