ListView
Android アプリに があります。アイテムのListView
カタログであるはずです。現在、行リストとして表示されているため、カタログとはあまり似ていません。
3 つの垂直行と、カタログ内のアイテム数と同じ数の水平行を使用して、ある種のテーブル ビューを作成する方法はありますListView
か? また、長方形のセルとしてうまく表示されるようにセルのレイアウトを変更するにはどうすればよいですか?
CellLayout.xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/itemNameList"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/itemPriceList"
android:layout_below="@+id/itemNameList"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/itemImageList"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />