diff options
| author | Gilles Debunne <debunne@google.com> | 2012-05-01 12:07:06 -0700 |
|---|---|---|
| committer | Gilles Debunne <debunne@google.com> | 2012-05-01 12:11:23 -0700 |
| commit | 2fb40285c78db71f41774650e4da47dda191e787 (patch) | |
| tree | 472442e261856f1ce6373909968d5d52ded59330 /core/java/android/widget/CheckedTextView.java | |
| parent | 2f87014ea2f177e715032b07004d05e2549a63a8 (diff) | |
API fix in CheckedTextView
Bug 6103310
Change-Id: Ic144ed99199a296df3ef1a16f59caff08af58fd9
Diffstat (limited to 'core/java/android/widget/CheckedTextView.java')
| -rw-r--r-- | core/java/android/widget/CheckedTextView.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java index 02bb4f37c8e1..278192cf0064 100644 --- a/core/java/android/widget/CheckedTextView.java +++ b/core/java/android/widget/CheckedTextView.java @@ -35,6 +35,8 @@ import android.view.accessibility.AccessibilityNodeInfo; * {@link android.widget.ListView#setChoiceMode(int) setChoiceMode} has been set to * something other than {@link android.widget.ListView#CHOICE_MODE_NONE CHOICE_MODE_NONE}. * + * @attr ref android.R.styleable#CheckedTextView_checked + * @attr ref android.R.styleable#CheckedTextView_checkMark */ public class CheckedTextView extends TextView implements Checkable { private boolean mChecked; @@ -100,6 +102,11 @@ public class CheckedTextView extends TextView implements Checkable { * when {@link #isChecked()} is true. * * @param resid The Drawable to use for the checkmark. + * + * @see #setCheckMarkDrawable(Drawable) + * @see #getCheckMarkDrawable() + * + * @attr ref android.R.styleable#CheckedTextView_checkMark */ public void setCheckMarkDrawable(int resid) { if (resid != 0 && resid == mCheckMarkResource) { @@ -119,6 +126,11 @@ public class CheckedTextView extends TextView implements Checkable { * Set the checkmark to a given Drawable. This will be drawn when {@link #isChecked()} is true. * * @param d The Drawable to use for the checkmark. + * + * @see #setCheckMarkDrawable(int) + * @see #getCheckMarkDrawable() + * + * @attr ref android.R.styleable#CheckedTextView_checkMark */ public void setCheckMarkDrawable(Drawable d) { if (mCheckMarkDrawable != null) { @@ -142,6 +154,20 @@ public class CheckedTextView extends TextView implements Checkable { resolvePadding(); } + /** + * Gets the checkmark drawable + * + * @return The drawable use to represent the checkmark, if any. + * + * @see #setCheckMarkDrawable(Drawable) + * @see #setCheckMarkDrawable(int) + * + * @attr ref android.R.styleable#CheckedTextView_checkMark + */ + public Drawable getCheckMarkDrawable() { + return mCheckMarkDrawable; + } + @Override public void onPaddingChanged(int layoutDirection) { int newPadding = (mCheckMarkDrawable != null) ? |
