diff options
| author | 2009-09-10 14:11:20 -0700 | |
|---|---|---|
| committer | 2009-09-10 14:11:20 -0700 | |
| commit | 4bdf17c69712b28e82f15f81f39482ff096b7f67 (patch) | |
| tree | ce195a94684b97fe3ad2fbcd5b309505d4f3a8fc | |
| parent | dc9555fb64b3fe53a06e7eabbf4a31018b9ee1ac (diff) | |
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
| -rw-r--r-- | core/java/com/android/internal/widget/DialogTitle.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/com/android/internal/widget/DialogTitle.java b/core/java/com/android/internal/widget/DialogTitle.java index 2eef0b663851..125d2c531d69 100644 --- a/core/java/com/android/internal/widget/DialogTitle.java +++ b/core/java/com/android/internal/widget/DialogTitle.java @@ -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); } } } } - -}
\ No newline at end of file +} |