Change checkMark or size of CheckedTextView

I am working on an application in which I use checkTextView, everything works fine. But I really don't like this "checkbox" layout inside checkTextView, it's just great. Is there a way to resize it or change the layout to something custom made?

I tried the attribute android:checkMark, but this led to it being tagged all the time and thus showing all the time.

+5
source share
1 answer

Instead of using a single output, you should write a selector:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:drawable="@drawable/drawable_checked"
        android:state_checked="true" />
    <item
        android:drawable="@drawable/drawable_unchecked"
        android:state_checked="false" />
</selector>

And then set it to an attribute android:checkMark.

+17
source

All Articles