自定义ListView的适配器(adapter)步骤如下:
- 自定义适配器布局文件。例如,定义布局文件layout_adapter.xml,内容如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizenal" >
<TextView android:id="+id/"/>
</LinearLayout>