0

I've created multi column in listview with custom adapter. I want to add headers to my listview. I created list_adapter.xml bellow my code

<LinearLayout
android:id="@+id/relativeLayout1"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">

<TextView
    android:id="@+id/date"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:text="@string/date"
    android:layout_weight="1">
</TextView>
<TextView
    android:id="@+id/event"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:text="@string/event"
    android:layout_weight="1">
</TextView>
<TextView
    android:id="@+id/vanue"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:text="@string/vanue"
    android:layout_weight="1">
</TextView>

There is a photo what I want:

The wanted result

Maxouille
  • 2,729
  • 2
  • 19
  • 42
  • I you may try create a header View layout and use listview.addHeaderView(View v) to add the header – CbL Mar 28 '19 at 15:45
  • Possible duplicate of [How to add Header to List View In Android](https://stackoverflow.com/questions/10730445/how-to-add-header-to-list-view-in-android) – Maxouille Mar 28 '19 at 15:50

0 Answers0