开发者

CheckBox doesn't appear in CheckedTextView

开发者 https://www.devze.com 2023-02-12 16:46 出处:网络
When I set up my CheckedTextView, it has no CheckBox. Here is the xml code for it: <?xml version=\"1.0\" encoding=\"utf-8\"?>

When I set up my CheckedTextView, it has no CheckBox. Here is the xml code for it:

<?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/check开发者_StackOverflow中文版Mark"
            />
</RelativeLayout>


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


replace

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

by

android:checkMark="?android:attr/textCheckMark" 
0

精彩评论

暂无评论...
验证码 换一张
取 消