title: How to fix Header on ListView while using addHeaderView() method in android
body: <p>I am making contact list using JSON and inside this i used a ListView. Inside that i want to add a header &amp; i make it using addHeaderView() method here is the xml and code i had used.</p>
  
  <p>header.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent" &gt;
  
  &lt;TextView
      android:id="@+id/Contacts"
      android:layout_width="fill_parent"
      android:layout_height="50dp"
      android:text="Large Text"
      android:textColor="#ffffff"
      android:background="#000000"
      android:layout_alignParentTop="true"
      android:gravity="center"
      android:layout_centerHorizontal="true"
      android:textSize="20dp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>in MainActivity.java</p>
  
  <pre><code>    ListView list= (ListView)findViewById(R.id.listView1);
      BaseAdap adp= new BaseAdap(getApplicationContext(),contact_list);
  
  
      LayoutInflater inf= (LayoutInflater)getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
      View v= inf.inflate(R.layout.header, null);
      list.addHeaderView(v);
  
      list.setAdapter(adp);
  </code></pre>
  
  <p>By doing this, header is attached to the listview bt it is scrollable when i scroll the list down. Can anyone tell me the method to make this header fixed on top. So that it didn't scroll when i scroll listview down.
  Thank in advance, Please Help</p>