我需要在列表视图中列出联系人,以显示每个行项目的图像,联系人姓名,号码和呼叫图标。如何将列表视图分成三列,并将其中一列垂直放入两列android
每行应该分成三列。 第一栏将有联系人图片,第二栏垂直分为两部分,第一列用于联系人姓名,第二列用于数字。 和最后一列将有一个图标/图像。
我在下面试过。但没有得到所需的格式。 这是可能的,我们在下面(而不是gridview)使用Listview吗?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/listView_all_cont"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#a556f4"
android:scrollbars="horizontal"/>
<ImageView
android:id="@+id/imgView_contImg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:src="@drawable/no_image" />
<TextView
android:id="@+id/txtView_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:textColor="#ffffff"
android:textSize="18sp" />
<TextView
android:id="@+id/txtView_number"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:textColor="#ffffff"
android:textSize="14sp" />
</LinearLayout>
有人可以帮忙吗?