public void addHeaderView(View v,Object data,boolean isSelectable){
  if (mAdapter != null && !(mAdapter instanceof HeaderViewListAdapter)) {
    throw new IllegalStateException("Cannot add header view to list -- setAdapter has already been called.");
  }
  FixedViewInfo info=new FixedViewInfo();
  info.view=v;
  info.data=data;
  info.isSelectable=isSelectable;
  mHeaderViewInfos.add(info);
  if (mAdapter != null && mObserver != null) {
    mObserver.onChanged();
  }
}

public void addHeaderView ( View v , Object data , boolean isSelectable ) { if ( mAdapter != null && ! ( mAdapter instanceof HeaderViewListAdapter ) ) { throw new IllegalStateException ( "Cannot add header view to list -- setAdapter has already been called." ) ; } FixedViewInfo info = new FixedViewInfo ( ) ; info . view = v ; info . data = data ; info . isSelectable = isSelectable ; mHeaderViewInfos . add ( info ) ; if ( mAdapter != null && mObserver != null ) { mObserver . onChanged ( ) ; } }
add a fixed view to appear at the top of the list . if addheaderview is called more than once , the views will appear in the order they were added . views added using this call can take focus if they want . < p / > note : call this before calling setadapter . this is so listview can wrap the supplied cursor with one that will also account for header and footer views .
