这是我的自定义列表视图的行。如您所见,共有三个 imageView。我应该如何覆盖
public View getView(int position, View convertView, ViewGroup parent)
我的适配器类,这样,无论我的列表中有多少图像视图,我都可以设置 imageView.setImageResource。任何帮助深表感谢。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:id="@+id/LinearLayout01"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="10px" />
<ImageView
android:id="@+id/image1"
android:layout_toRightOf= "@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10px" />
<ImageView
android:id="@+id/image2"
android:layout_toRightOf= "@+id/image1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10px" />
</RelativeLayout>
</LinearLayout>