I have a ListView whereby each row contains a CheckedTextView. I am using a custom checkMark attribute, which uses a drawable:
<CheckedTextView
android:id="@+id/body"
android:gravity="left"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_below="@+id/date"
android:textSize="18sp"
android:checkMark="@drawable/checkbox_selector"
/>
The drawable checkbox_selector correctly handles the 'on' and 'off' selection as expected and is as follows:
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_selected="true" android:state_pressed="true"
android:drawable="@drawable/checkbox_on" >
</item>
<item android:state_pressed="true" android:drawable="@drawable/checkbox_on" />
<item android:state_checked="true" android:drawable="@drawable/checkbox_on"/>
<item android:drawable="@drawable/checkbox_off" />
</selector>
Here is a screenshot of the current ListView layout:
As you can see, the check box is top aligned. Is there any way to right-center it? Checking attributes of the selector resource, I can't find any relevant attributes to perform this.
Is there any way I could adjust its position? Thank you for your time.