ListView
放置界面控件
activity_main.xml
<ListView
android:id="@+id/lv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:listSelector="#B5DCFA">
</ListView>
创建Item界面
listview2.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv"
android:layout_width="120dp"
android:layout_height="90dp"
android:background="@drawable/table"
android:layout_marginRight="10dp">
</ImageView>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/iv"
android:text="桌子"
android:textSize="20dp"
android:layout_marginTop="10dp">
</TextView>
<TextView
android:id="@+id/price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/iv"
android:layout_below="@id/title"
android:text="价格: "
android:textSize="15dp"
android:textColor="#FF8F03"
android:layout_marginTop="15dp">
</TextView>
<TextView
android:id&