creating a list using android xml and java

KumBa

New Member
I got a list from the web (link is here ) where it uses two xml layouts to create a list, the first xml is just the background where the second xml is going to be displayed as buttons in a list. what I am trying to do is have that same list but add a tittle or a picture title at the top, i've been playing around with the list but i cant get it to work, the only way i can think to make this happen is somehow moving the position in which the second xml is displayed and have the top part to add whatever i like. Thank you for the help and ideas to make this work![EDIT] code snippet...First XML layout\[code\]<?xml version="1.0" encoding="utf-8"?><ListView xmlns:android="schemas.android.com/apk/res/android";android:id="@android:id/list"android:layout_width="fill_parent" android:layout_weight="1"android:scrollbars="none"android:divider="#000000"android:scrollingCache="true" android:layout_height="wrap_content"/>\[/code\]Second XML layout\[code\]<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="schemas.android.com/apk/res/android"android:orientation="vertical"android:background="#AA010101"android:layout_width="fill_parent"android:layout_height="wrap_content" ><ListView android:id="@+id/list"android:layout_width="1px"android:layout_height="1px"android:layout_weight="1"></ListView><RelativeLayout xmlns:android="schemas.android.com/apk/res/android"android:orientation="horizontal"android:layout_width="fill_parent"android:paddingLeft="10dp"android:paddingTop="5dp"android:paddingBottom="5dp" android:layout_height="fill_parent"><ImageView android:id="@+id/img"android:layout_width="80dp"android:layout_height="70dp"android:layout_alignParentLeft="true"android:scaleType="fitXY" /><TextView android:layout_width="wrap_content"android:id="@+id/title" android:layout_height="wrap_content"android:paddingTop="18dp"android:layout_toRightOf="@+id/img" android:textStyle="bold"android:textColor="#ffffff"android:layout_marginRight="50dp"android:paddingLeft="10dp"android:textSize="16sp" /></RelativeLayout></LinearLayout>\[/code\]
 
Back
Top