List of usage examples for android.widget QuickContactBadge QuickContactBadge
public QuickContactBadge(Context context)
From source file:com.android.contacts.common.list.ContactListItemView.java
/** * Returns the quick contact badge, creating it if necessary. *///w ww . j a v a2s. c o m public QuickContactBadge getQuickContact() { if (!mQuickContactEnabled) { throw new IllegalStateException("QuickContact is disabled for this view"); } if (mQuickContact == null) { mQuickContact = new QuickContactBadge(getContext()); if (CompatUtils.isLollipopCompatible()) { mQuickContact.setOverlay(null); } mQuickContact.setLayoutParams(getDefaultPhotoLayoutParams()); if (mNameTextView != null) { mQuickContact.setContentDescription( getContext().getString(R.string.description_quick_contact_for, mNameTextView.getText())); } addView(mQuickContact); mPhotoViewWidthAndHeightAreReady = false; } return mQuickContact; }