CheckedTextView实现ListView的单选效果
1.activity_main.xml代码如下:
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:choiceMode="singleChoice"
tools:context=".MainActivity" />
2.item.xml代码如下
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android