11

当我设置我的CheckedTextView时,它没有CheckBox。这是它的xml代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
    <CheckedTextView
            android:id="@+id/checkedtext"
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:checked="false"
            android:textSize="25dp"
            android:textColor="#FFFFFF"
            android:checkMark="@android:attr/checkMark"
            />
</RelativeLayout>
4

2 回答 2

31

试试: android:checkMark="?android:attr/listChoiceIndicatorMultiple"

于 2012-04-13T00:37:22.930 回答
16

代替

android:checkMark="@android:attr/checkMark"

经过

android:checkMark="?android:attr/textCheckMark" 
于 2011-02-21T21:11:39.523 回答