Code example for QuickContactBadge

Methods: setImageDrawablesetVisibility, assignContactUri

0
                mAvatarView.assignContactFromPhone(contact.getNumber(), true);
            } 
        } else { 
            // TODO get a multiple recipients asset (or do something else) 
            avatarDrawable = sDefaultContactImage;
            mAvatarView.assignContactUri(null);
        } 
        mAvatarView.setImageDrawable(avatarDrawable);
        mAvatarView.setVisibility(View.VISIBLE);
    } 
 
    private void updateFromView() { 
        mFromView.setText(formatMessage());
        updateAvatarView(); 
    } 
 
    public void onUpdate(Contact updated) {
        if (Log.isLoggable(LogTag.CONTACT, Log.DEBUG)) {
            Log.v(TAG, "onUpdate: " + this + " contact: " + updated);
        } 
        mHandler.post(new Runnable() {