安卓一行两个的居中图像列表
定义一个item.xml作为视频摆放的模板
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:paddingTop="10dp"
android:gravity="center|top"
>
<ImageView
android:id="@+id/first_im_item"
android:layout_width="180dp"
android:layout_height="246dp"
android:background="@drawable/check_button"
android:scaleType="fitXY"
></ImageView>
<ImageView
android:id="@+id/second_im_item"
android:layout_width="180dp"
android:layout_height="246dp"
android:background="@drawable/check_button"
android:layout_toRightOf="@id/first_im_item"
android:layout_marginLeft="10dp"
android:scaleType="fitXY"
></ImageView>
</RelativeLayout>
这样可以居中显示,如图所示
然后定义一个ImageListAdapter类,这个类继承BaseAdapter,这个类中有两个属性
private List<Map<String, Object>> li