コード例 #1
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   View view = inflater.inflate(R.layout.fragment_contact_detail, container, false);
   view.findViewById(R.id.btn_send_message).setOnClickListener(this);
   mDetailHelper.setParentView(view);
   mDetailHelper.bindInfo();
   mDetailHelper.bindLabels();
   return view;
 }
コード例 #2
0
  private void updateContactLabelPraise() {
    if (!mContactQueried || !mLabelPraiseLoaded) {
      return;
    }

    if (mLabelPraises != null && mLabelPraises.length > 0) {
      final String userId = mContact.getUserId();

      for (LabelPraise labelPraise : mLabelPraises) {
        UserLabel userLabel = mLabelIdMap.get(labelPraise.getLabelId());
        if (userLabel != null && userId.equals(labelPraise.getUserId())) {
          userLabel.setPraiseCount(labelPraise.getPraiseCount());
        }
      }
    }

    // update list view and contact
    mDetailHelper.setDetail(new UserDetailHelper.Detail(mContact));
    mDetailHelper.bindInfo();
    mDetailHelper.bindLabels();
    mContactsManager.updateContact(mContact);
  }