Click here to Skip to main content
15,895,011 members
Articles / Mobile Apps / Android

Custom list item layout

Rate me:
Please Sign up or sign in to vote.
4.85/5 (11 votes)
23 Jan 2012CPOL7 min read 51.9K   1.9K   20  
Describe how to create list of items with custom defined layout resource
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
	<TextView  
    	android:layout_width="fill_parent" 
    	android:layout_height="wrap_content" 
    	android:text="@string/description"
    	/>
	<ListView 
		android:id="@+id/list"
    	android:layout_width="fill_parent" 
    	android:layout_height="wrap_content" 		
		/>
</LinearLayout>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead ASEC S.A. (member of OTI group)
Poland Poland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions