I would like to display sqlite data in ListView
. But I don't know how to set up the fixed width in ListView
column.
How can I make the column with fixed size?
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_co## Heading ##ntent"
android:layout_gravity="center"
Here is my XML. I just want to make the name,phone and location column in fixed layouts.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name:" />
<TextView
android:id="@+id/phoneNo"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:gravity="center"
android:text="Phone no:" />
<Button
android:id="@+id/location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Location:" />
</LinearLayout>
tools:context=".Shopping" >
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
Thanks a lot.