做出此效果图
首先添加布局界面MainActivity.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<!--
- android:scrollbars="vertical 添加滚动条
android:drawSelectorOnTop="true"
点击某一条记录,颜色会显示在最上面,记录上的文字被遮住,所以点击文字不放,文字就看不到
android:drawSelectorOnTop="false"
点击某条记录不放,颜色会在记录的后面,成为背景色,但是记录内容的文字是可见的
-->
<!--
LiveActivity本身继承了关于List操作的众多接口,我们可以方便的重写这些操作中需要的方法来实现自己需要的功能。
如果要用ListActivity,则 Activity的Layout文件中必须包括一个(只能一个)ListView,且ListView的id= "@id/android:list"。
-->
<LinearLayout
android:id="@+id/listlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
a