Пример #1
0
  @Override
  public void setSecondary(
      boolean show,
      String name,
      boolean nameIsNumber,
      String label,
      Drawable photo,
      boolean isConference,
      boolean isGeneric) {

    if (show) {
      if (isConference) {
        name = getConferenceString(isGeneric);
        photo = getConferencePhoto(isGeneric);
        nameIsNumber = false;
      }

      showAndInitializeSecondaryCallInfo();
      mSecondaryCallName.setText(name);

      int nameDirection = View.TEXT_DIRECTION_INHERIT;
      if (nameIsNumber) {
        nameDirection = View.TEXT_DIRECTION_LTR;
      }
      mSecondaryCallName.setTextDirection(nameDirection);

      setDrawableToImageView(mSecondaryPhoto, photo);
    } else {
      mSecondaryCallInfo.setVisibility(View.GONE);
    }
  }
Пример #2
0
  @Override
  public void setPrimary(
      String number,
      String name,
      boolean nameIsNumber,
      String label,
      Drawable photo,
      boolean isConference,
      boolean isGeneric,
      boolean isSipCall) {
    Log.d(this, "Setting primary call");

    if (isConference) {
      name = getConferenceString(isGeneric);
      photo = getConferencePhoto(isGeneric);
      nameIsNumber = false;
    }

    setPrimaryPhoneNumber(number);

    // set the name field.
    setPrimaryName(name, nameIsNumber);

    // Set the label (Mobile, Work, etc)
    setPrimaryLabel(label);

    showInternetCallLabel(isSipCall);

    setDrawableToImageView(mPhoto, photo);
  }
Пример #3
0
 @Override
 public void setSecondaryImage(Drawable image) {
   if (image != null) {
     setDrawableToImageView(mSecondaryPhoto, image);
   }
 }