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

Commit 4bdf17c6 authored by Romain Guy's avatar Romain Guy
Browse files

Dialog titles would sometimes use a font too large.

This was due to code in DialogTitle.java which would multiply the textSize of
the theme twice.

Change-Id: Id44e39e729ebd43b08c967a67cde0d33dd8f2efb
parent dc9555fb
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -58,14 +58,15 @@ public class DialogTitle extends TextView {
                            android.R.style.TextAppearance_Medium,
                            android.R.styleable.TextAppearance);
                    final int textSize = a.getDimensionPixelSize(
                            android.R.styleable.TextAppearance_textSize, 20);
                            android.R.styleable.TextAppearance_textSize,
                            (int) (20 * getResources().getDisplayMetrics().density));

                    setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);
                    // textSize is already expressed in pixels
                    setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
                    setMaxLines(2);
                    super.onMeasure(widthMeasureSpec, heightMeasureSpec);      
                }
            }
        }
    }
   
}