@Override
  public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    outState.putSerializable("mNewUser", mNewUser);
    outState.putSerializable("user", mUser);
    outState.putSerializable("friendship", mFriendship);
    outState.putSerializable("groupListed", mGroupMemberListed);
  }
  @Override
  protected void initRefreshList(Bundle savedInstanceState) {
    super.initRefreshList(savedInstanceState);

    ListView listView = (ListView) getRefreshView();
    viewProfile = View.inflate(getActivity(), R.layout.lay_profile_v2, null);
    AisenUtil.setAlpha(viewProfile);
    listView.addHeaderView(viewProfile);
  }
  @Override
  public void onResume() {
    super.onResume();

    setProfileView();

    BaiduAnalyzeUtils.onPageStart("个人微博");

    // 分组发生改变
    if (ActivityHelper.getInstance().getBooleanShareData("ChanneSortHasChanged", false)
        || ActivityHelper.getInstance().getBooleanShareData("offlineChanneChanged", false)) {
      setGroupList();
    }
  }
  @Override
  public void onPrepareOptionsMenu(Menu menu) {
    super.onPrepareOptionsMenu(menu);

    MenuItem mentionItem = menu.findItem(R.id.mention);
    MenuItem createItem = menu.findItem(R.id.create);
    MenuItem destoryItem = menu.findItem(R.id.destory);
    MenuItem followerDestoryItem = menu.findItem(R.id.followDestory);

    if (mUser == null || AppContext.getUser().getIdstr().equals(mUser.getIdstr())) {
      mentionItem.setVisible(false);
      createItem.setVisible(false);
      destoryItem.setVisible(false);
      followerDestoryItem.setVisible(false);
    } else {
      mentionItem.setVisible(true);

      createItem.setVisible(mFriendship != null && !mFriendship.getSource().getFollowing());
      destoryItem.setVisible(mFriendship != null && mFriendship.getSource().getFollowing());

      followerDestoryItem.setVisible(mFriendship != null && mFriendship.getTarget().getFollowing());
    }
  }
  @Override
  protected void layoutInit(LayoutInflater inflater, Bundle savedInstanceSate) {

    super.layoutInit(inflater, savedInstanceSate);

    getActivity().getActionBar().setDisplayHomeAsUpEnabled(true);
    getActivity().getActionBar().setTitle(R.string.title_user_profile);

    mNewUser =
        savedInstanceSate == null
            ? (WeiBoUser) getArguments().getSerializable("newUser")
            : (WeiBoUser) savedInstanceSate.getSerializable("mNewUser");
    if (mNewUser != null) {
      mUser = mNewUser;
    } else {
      mUser =
          savedInstanceSate == null
              ? (WeiBoUser) getArguments().getSerializable("user")
              : (WeiBoUser) savedInstanceSate.getSerializable("user");
    }
    mFriendship =
        savedInstanceSate == null
            ? (FriendshipShow) getArguments().getSerializable("friendship")
            : (FriendshipShow) savedInstanceSate.getSerializable("friendship");
    mGroupMemberListed =
        savedInstanceSate == null
            ? (GroupMemberListed) getArguments().getSerializable("groupListed")
            : (GroupMemberListed) savedInstanceSate.getSerializable("groupListed");

    viewProfile = getRootView();

    if (savedInstanceSate == null) {
      loadFriendship();
    }

    setHasOptionsMenu(true);
  }
  @Override
  public void onPause() {
    super.onPause();

    BaiduAnalyzeUtils.onPageEnd("个人微博");
  }
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    super.onCreateOptionsMenu(menu, inflater);

    inflater.inflate(R.menu.profile, menu);
  }
  @Override
  protected void config(RefreshConfig config) {
    super.config(config);

    config.savePosition = false;
  }