Skip to content Skip to sidebar Skip to footer

How To Customize A Set Drawable Position Checkedtextview?

public class CheckedTextView extends TextView implements Checkable { private boolean mChecked; private int mCheckMarkResource; private Drawable mCheckMarkDrawable;

Solution 1:

If you want the checkbox to be on the left, simply just use a CheckBox. Maybe it is not matter of course, but a CheckBox can contain text. You can define that text by adding an XML attribute android:text, or by calling the setText() method. Actually CheckBox is inherited from Button, which inherits from TextView, that's why it has all the text-related properties.

Solution 2:

Use drawableRight instead of checkMarkDrawable in xml.

Post a Comment for "How To Customize A Set Drawable Position Checkedtextview?"