/*
  * (non-Javadoc)
  *
  * @see android.widget.BaseAdapter#notifyDataSetChanged()
  */
 @Override
 public void notifyDataSetChanged() {
   // TODO Auto-generated method stub
   // pos = -1;
   super.notifyDataSetChanged();
   activity.setTitle("");
   activity.setProgressBarIndeterminateVisibility(false);
 }
  @Override
  public void configurePinnedHeaders(PinnedHeaderListView listView) {
    super.configurePinnedHeaders(listView);

    if (!isSectionHeaderDisplayEnabled()) {
      return;
    }

    int index = getPinnedHeaderCount() - 1;
    if (mIndexer == null || getCount() == 0) {
      listView.setHeaderInvisible(index, false);
    } else {
      int listPosition = listView.getPositionAt(listView.getTotalTopPinnedHeaderHeight());
      int position = listPosition - listView.getHeaderViewsCount();

      int section = -1;
      int partition = getPartitionForPosition(position);
      if (partition == mIndexedPartition) {
        int offset = getOffsetInPartition(position);
        if (offset != -1) {
          section = getSectionForPosition(offset);
        }
      }

      if (section == -1) {
        listView.setHeaderInvisible(index, false);
      } else {
        setPinnedSectionTitle(mHeader, (String) mIndexer.getSections()[section]);
        if (section == 0) {
          setPinnedHeaderContactsCount(mHeader);
        } else {
          clearPinnedHeaderContactsCount(mHeader);
        }
        // Compute the item position where the current partition begins
        int partitionStart = getPositionForPartition(mIndexedPartition);
        if (hasHeader(mIndexedPartition)) {
          partitionStart++;
        }

        // Compute the item position where the next section begins
        int nextSectionPosition = partitionStart + getPositionForSection(section + 1);
        boolean isLastInSection = position == nextSectionPosition - 1;
        listView.setFadingHeader(index, listPosition, isLastInSection);
      }
    }
  }