• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Multi fieldlistView or equivalent

I am new to android development and have been tasked with developing an app. One of the screens will require there to be a list of people with some thumbnail information about them, similar to:

Code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="?android:attr/listPreferredItemHeight"
    
    android:padding="6dip">
    
    <ImageView
        android:id="@+id/icon"
        
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_marginRight="6dip"
        
        android:src="@drawable/icon" />

    <LinearLayout
        android:orientation="vertical"
    
        android:layout_width="0dip"
        android:layout_weight="1"
        android:layout_height="fill_parent">

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1"
                    
            android:gravity="center_vertical"
            android:text="Fist, Last" />
            
        <TextView  
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1" 
            
            android:singleLine="true"
            android:ellipsize="marquee"
            android:text="Description" />
            
    </LinearLayout>

</LinearLayout>

This information will be stored in an SQLite DB. Now I can see that listView seems only to work with a single column. What is the best way to go about this?
 
Maybe you're looking for the "RelativeLayout"

Here is some tutorial and how it looks:
1.Learn Android : Android Layout Tutorial
2.Relative Layout | Android Developers

Thank you for taking the time to replay. A relative layout may be preferable to a linear one. However it still doesnt solve the problem I'm having.

How do I use this layout and repeat it for as many times as there are records in a table. Populating the various textViews with the different columns of the table?
 
Back
Top Bottom