private void initList() {
    // TODO Auto-generated method stub
    // list = new ArrayList<TaoInfo>();
    mPullRefreshListView = (PullToRefreshListView) v.findViewById(R.id.lv_infor_infor);

    // Set a listener to be invoked when the list should be refreshed.
    mPullRefreshListView.setOnRefreshListener(
        new OnRefreshListener2<ListView>() {

          @Override
          public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
            // TODO Auto-generated method stub
            String label =
                getString(R.string.last_update_time)
                    + DateUtils.formatDateTime(
                        getActivity(),
                        System.currentTimeMillis(),
                        DateUtils.FORMAT_SHOW_TIME
                            | DateUtils.FORMAT_SHOW_DATE
                            | DateUtils.FORMAT_ABBREV_ALL);

            // Update the LastUpdatedLabel
            refreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label);

            // Do work to refresh the list here.
            getFirstData();
          }

          @Override
          public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
            // TODO Auto-generated method stub
            getNextData();
          }
        });

    // Add an end-of-list listener
    mPullRefreshListView.setOnLastItemVisibleListener(
        new OnLastItemVisibleListener() {

          @Override
          public void onLastItemVisible() {}
        });

    mPullRefreshListView.setOnItemClickListener(
        new OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            // TODO Auto-generated method stub
            position--; // by zj 从1开始算的,要减去1
            String uid = list.get(position).getUid();
            MyIntentUtil.toPersonalOtherDetail(getActivity(), uid);
          }
        });

    mPullRefreshListView.setMode(Mode.BOTH);

    ListView lv = mPullRefreshListView.getRefreshableView();

    /** Add Sound Event Listener */
    SoundPullEventListener<ListView> soundListener =
        new SoundPullEventListener<ListView>(getActivity());
    soundListener.addSoundEvent(State.PULL_TO_REFRESH, R.raw.pull_event);
    soundListener.addSoundEvent(State.RESET, R.raw.reset_sound);
    soundListener.addSoundEvent(State.REFRESHING, R.raw.refreshing_sound);
    // mPullRefreshListView.setOnPullEventListener(soundListener);

    // ad = new FriendAdapter(getActivity(), list);
    ad = new FriendAdapter(getActivity(), list, false, true, true, false);
    lv.setAdapter(ad);

    //
  }
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_ptr_list);

    mPullRefreshListView = (PullToRefreshListView) findViewById(R.id.pull_refresh_list);
    mPullRefreshListView.setHeaderLayout(new JingDongHeaderLayout(this));
    mPullRefreshListView.setFooterLayout(new JingDongHeaderLayout(this, Mode.PULL_FROM_END));

    // Set a listener to be invoked when the list should be refreshed.
    mPullRefreshListView.setOnRefreshListener(
        new OnRefreshListener<ListView>() {
          @Override
          public void onRefresh(PullToRefreshBase<ListView> refreshView) {
            String label =
                DateUtils.formatDateTime(
                    getApplicationContext(),
                    System.currentTimeMillis(),
                    DateUtils.FORMAT_SHOW_TIME
                        | DateUtils.FORMAT_SHOW_DATE
                        | DateUtils.FORMAT_ABBREV_ALL);

            // Update the LastUpdatedLabel
            refreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label);

            // Do work to refresh the list here.
            new GetDataTask().execute();
          }
        });

    // Add an end-of-list listener
    mPullRefreshListView.setOnLastItemVisibleListener(
        new OnLastItemVisibleListener() {

          @Override
          public void onLastItemVisible() {
            Toast.makeText(PullToRefreshListActivity.this, "End of List!", Toast.LENGTH_SHORT)
                .show();
          }
        });

    ListView actualListView = mPullRefreshListView.getRefreshableView();

    // Need to use the Actual ListView when registering for Context Menu
    registerForContextMenu(actualListView);

    mListItems = new LinkedList<String>();
    mListItems.addAll(Arrays.asList(mStrings));

    mAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mListItems);
    mAdapter.notifyDataSetChanged();
    /** Add Sound Event Listener */
    SoundPullEventListener<ListView> soundListener = new SoundPullEventListener<ListView>(this);
    soundListener.addSoundEvent(State.PULL_TO_REFRESH, R.raw.pull_event);
    soundListener.addSoundEvent(State.RESET, R.raw.reset_sound);
    soundListener.addSoundEvent(State.REFRESHING, R.raw.refreshing_sound);
    mPullRefreshListView.setOnPullEventListener(soundListener);

    // You can also just use setListAdapter(mAdapter) or
    // mPullRefreshListView.setAdapter(mAdapter)
    actualListView.setAdapter(mAdapter);
  }