I am new to Android. Please help me. I have two String Arrays as below:
String[] Array1 = {"ele1", "ele2", "ele3", "ele4", "ele5", "ele6"};
String[] Array2 = {"obj1", "obj2", "obj3", "obj4", "obj5", "obj6"};
I have a listview in my layout as below:
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/lytlistView"
android:layout_marginTop="4dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_below="@+id/lytListView">
</ListView>
Now i want to add two string array's values for listview as shown in the following:
-------------------------
listHeader1
listContent1
-------------------------
listHeader2
listContent2
-------------------------
listHeader3
listContent3
-------------------------
So, listHeader[1,2,3,..]
contains Array1[]
elements and listContent[1,2,3,....]
contains Array2[]
elements
How can i achieve that? Please help me.