I'm using a ListView
with an array adapter to display multiple list items. I'd like to have multiple TextView
in the list item as per the picture
I'm currently using a linear layout which doesn't seem to be suitable... Would a relative layout help me achieve this?
Example code or tutorial link would be cool
Cheers ListView xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/listViewTest"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
ArrayAdapter xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="89dp"
android:layout_marginLeft="4px"
android:layout_marginRight="10px"
android:layout_marginTop="4px"
android:layout_weight="0.34"
android:src="@drawable/ic_launcher" >
</ImageView>
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_weight="0.97"
android:gravity="center"
android:text="@+id/label"
android:textSize="30dp" >
</TextView>
</LinearLayout>
I'm trying to add another textView under the existing textView using graphical layout tab in eclipse but my noobieness is getting in the way