summaryrefslogtreecommitdiffstats
path: root/core/java/com/android/internal/widget/DialogTitle.java
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2011-06-14 13:37:14 -0700
committerAdam Powell <adamp@google.com>2011-06-16 18:20:54 -0700
commita93347a62ec9887862abb9d6f216906c533a8562 (patch)
treeee9cf28e93786d4ff4cc393bedc378904500bb4b /core/java/com/android/internal/widget/DialogTitle.java
parent46d6bcfb95525132fcfb4ec15aae0af4ec7475c5 (diff)
downloadframeworks_base-a93347a62ec9887862abb9d6f216906c533a8562.zip
frameworks_base-a93347a62ec9887862abb9d6f216906c533a8562.tar.gz
frameworks_base-a93347a62ec9887862abb9d6f216906c533a8562.tar.bz2
Dialog-o-rama!
New styling for Holo dialogs. Now 76% easier for apps to create dialog-based layouts! (Less tricky padding and margin rules) Cancelable AlertDialogs now are canceled when the user touches outside. Dialogs in landscape mode will try not to fill the width of the screen. Change-Id: I621b5a19780883ee703a8492510451b480a0b8cc
Diffstat (limited to 'core/java/com/android/internal/widget/DialogTitle.java')
-rw-r--r--core/java/com/android/internal/widget/DialogTitle.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/com/android/internal/widget/DialogTitle.java b/core/java/com/android/internal/widget/DialogTitle.java
index 125d2c5..cd165dc 100644
--- a/core/java/com/android/internal/widget/DialogTitle.java
+++ b/core/java/com/android/internal/widget/DialogTitle.java
@@ -54,15 +54,19 @@ public class DialogTitle extends TextView {
if (ellipsisCount > 0) {
setSingleLine(false);
- TypedArray a = mContext.obtainStyledAttributes(
- android.R.style.TextAppearance_Medium,
- android.R.styleable.TextAppearance);
+ 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);
// textSize is already expressed in pixels
setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
+ setTextColor(textColor);
setMaxLines(2);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}