@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final Activity activity = getActivity();

    mContactsManager = ContactsManager.getInstance(activity);
    mContactsManager.registerListener(mContactListener);
    mLabelManager = UserLabelManager.getInstance(activity);

    loadContact();
    mDetailHelper = new UserDetailHelper(activity, mHelperListener);
    if (mContact != null) {
      mDetailHelper.setDetail(new UserDetailHelper.Detail(mContact));
      mLabelIdMap = buildLabelIdMap(mContact.getLabels());
    }
    mMyLabelIdList = buildLabelIdList(mLabelManager.getAllLabels());

    setHasOptionsMenu(true);
    final ActionBar actionBar = activity.getActionBar();
    if (actionBar != null) {
      if (mContact != null) {
        actionBar.setTitle(mContact.getShowName());
      } else {
        actionBar.setTitle(R.string.friend_detail);
      }
    }

    mContactQueried = false;
    mLabelPraiseLoaded = false;

    if (mContact != null) {
      queryContactInfo();
      loadLabelPraise();
    }
  }
 private void handleQueryContactInfoResult(int result, UserContact contact) {
   L.v(TAG, "handleQueryContactInfoResult(), result=%1$d, count=%2$s", result, contact);
   if (contact != null && contact.getUserId().equals(mContact.getUserId())) {
     contact.setId(mContact.getId());
     mContact = contact;
     mLabelIdMap = buildLabelIdMap(mContact.getLabels());
   }
   mContactQueried = true;
   updateContactLabelPraise();
 }