diff options
| author | Leon Scroggins <scroggo@google.com> | 2009-10-19 19:04:30 -0400 |
|---|---|---|
| committer | Leon Scroggins <scroggo@google.com> | 2009-10-21 10:01:49 -0400 |
| commit | a8da17356f9a385e097e3eef205358462d214538 (patch) | |
| tree | 9425ee09c9648470c2516c8875c6277d6c10db44 /core/java/android/widget/CheckedTextView.java | |
| parent | 8785c064fab3429c792ac160aeeb19e9926382f0 (diff) | |
Do not show radio/checkboxes for <optgroup> labels.
Fix for http://b/issue?id=2186188. Keep track of <optgroup> labels
separately from disabled <option> labels. Requires a change to
external/webkit.
In CheckedTextView, if the CheckMarkDrawable is set to null,
remove it.
Diffstat (limited to 'core/java/android/widget/CheckedTextView.java')
| -rw-r--r-- | core/java/android/widget/CheckedTextView.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java index fd590ed16a8b..aa9062b1f57f 100644 --- a/core/java/android/widget/CheckedTextView.java +++ b/core/java/android/widget/CheckedTextView.java @@ -117,11 +117,11 @@ public class CheckedTextView extends TextView implements Checkable { * @param d The Drawable to use for the checkmark. */ public void setCheckMarkDrawable(Drawable d) { + if (mCheckMarkDrawable != null) { + mCheckMarkDrawable.setCallback(null); + unscheduleDrawable(mCheckMarkDrawable); + } if (d != null) { - if (mCheckMarkDrawable != null) { - mCheckMarkDrawable.setCallback(null); - unscheduleDrawable(mCheckMarkDrawable); - } d.setCallback(this); d.setVisible(getVisibility() == VISIBLE, false); d.setState(CHECKED_STATE_SET); @@ -130,10 +130,10 @@ public class CheckedTextView extends TextView implements Checkable { mCheckMarkWidth = d.getIntrinsicWidth(); mPaddingRight = mCheckMarkWidth + mBasePaddingRight; d.setState(getDrawableState()); - mCheckMarkDrawable = d; } else { mPaddingRight = mBasePaddingRight; } + mCheckMarkDrawable = d; requestLayout(); } |
