The better way is set the header statically in a separated layout (ouside your ListView). An example that illustrates this could be:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<View
android:id="@+id/YOUR_HEADER_VIEW"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
You have to replace the View with your header's view.
I hope this solve your problem.