public String getrDrawableName() { return getImageURL() == null ? getImageURL() : getImageURL().substring(R_DRAWABLE.length() + 1); }
int drawableResourceId = context.getResources().getIdentifier(contact.getrDrawableName(), "drawable", context.getPackageName()); imageView.setImageResource(drawableResourceId); } else if (contact.getImageURL() != null) { loadImage(imageView, textView, contact.getImageURL(), 0); } else { textView.setVisibility(View.VISIBLE);
alphabeticTextView.setVisibility(View.GONE); } else if (contact != null && contactImage != null) { if (TextUtils.isEmpty(contact.getImageURL())) { contactImage.setVisibility(View.GONE); alphabeticTextView.setVisibility(View.VISIBLE); if (TextUtils.isEmpty(contactDisplayName.getImageURL())) { contactImage.setVisibility(View.GONE); alphabeticTextView.setVisibility(View.VISIBLE);
@Override public void setToolbarImage(Contact contact, Channel channel){ if(ApplozicSetting.getInstance(this).isShowImageOnToolbar() || alCustomizationSettings.isShowImageOnToolbar()) { conversationContactPhoto.setVisibility(View.VISIBLE); if (contact != null) { Glide.with(this) .load(contact.getImageURL()) .apply(new RequestOptions().placeholder(R.drawable.applozic_ic_contact_picture_holo_light)) .into(conversationContactPhoto); } else if (channel != null) { Glide.with(this) .load(channel.getImageUrl()) .apply(new RequestOptions().placeholder(R.drawable.applozic_group_icon)) .into(conversationContactPhoto); } else { conversationContactPhoto.setImageResource(R.drawable.applozic_ic_contact_picture_holo_light); } } }
public void refreshContactData() { if (contact != null) { Contact updateContact = baseContactService.getContactById(contact.getContactIds()); if (updateContact != null && (!TextUtils.isEmpty(contact.getImageURL())) && (!contact.getImageURL().equals(updateContact.getImageURL()))) { contactImageLoader.loadImage(updateContact, contactImage); } if (!TextUtils.isEmpty(updateContact.getStatus())) { status_cardView.setVisibility(View.VISIBLE); status.setText(updateContact.getStatus()); } if (!TextUtils.isEmpty(updateContact.getContactNumber())) { phone_cardView.setVisibility(View.VISIBLE); phone.setText(updateContact.getContactNumber()); } if (updateContact != null && (!TextUtils.isEmpty(contact.getDisplayName())) && (!contact.getDisplayName().equals(updateContact.getDisplayName()))) { name_cardView.setVisibility(View.VISIBLE); name.setText(updateContact.getDisplayName()); reload(); } } }
try { if (contact != null) { connection = openHttpConnection(contact.getImageURL()); } else { connection = openHttpConnection(channel.getImageUrl());
@Override public Bitmap downloadContactImage(Context context, Contact contact) { if (contact != null && TextUtils.isEmpty(contact.getImageURL())) { return null; } Bitmap attachedImage = ImageUtils.getBitMapFromLocalPath(contact.getLocalImageUrl()); if (attachedImage != null) { return attachedImage; } Bitmap bitmap = fileClientService.downloadBitmap(contact, null); if (bitmap != null) { File file = FileClientService.getFilePath(contact.getContactIds(), context.getApplicationContext(), "image", true); String imageLocalPath = ImageUtils.saveImageToInternalStorage(file, bitmap); contact.setLocalImageUrl(imageLocalPath); } if (!TextUtils.isEmpty(contact.getLocalImageUrl())) { updateLocalImageUri(contact); } return bitmap; }
if (!TextUtils.isEmpty(contact.getImageURL())) { contentValues.put(MobiComDatabaseHelper.CONTACT_IMAGE_URL, contact.getImageURL()); contactImage = getContactById(contact.getUserId()); if (contactImage != null && !TextUtils.isEmpty(contactImage.getImageURL()) && !TextUtils.isEmpty(contact.getImageURL()) && !contact.getImageURL().equals(contactImage.getImageURL())) { updateContactLocalImageURIToNull(contact.getUserId());
Utils.printLog(context, "UserService", contact1.getImageURL() + ", " + contact1.getDisplayName() + "," + contact1.getStatus() + "," + contact1.getStatus() + "," + contact1.getMetadata());