An extension to TextView that supports the
Checkable interface.
This is useful when used in a
ListView where the it's
setChoiceMode has been set to
something other than
CHOICE_MODE_NONE.
super(context, attrs, defStyle);
Changes the checked state of this text view.
- Parameters:
checked true to check the text, false to uncheck it
Set the checkmark to a given Drawable, identified by its resourece id. This will be drawn
when
isChecked() is true.
- Parameters:
resid The Drawable to use for the checkmark.
Set the checkmark to a given Drawable. This will be drawn when
isChecked() is true.
- Parameters:
d The Drawable to use for the checkmark.
public void setPadding(int left, int top, int right, int bottom) { if (checkMarkDrawable != null) { switch (verticalGravity) { checkMarkDrawable.draw(canvas);
final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);