Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c07cc99e authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Keep original DialogTitle color when resizing."

parents b7d95a46 5c848ce7
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -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);      
                }
            }