public class

QuickContactBadge

extends ImageView
implements View.OnClickListener
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.ImageView
       ↳ android.widget.QuickContactBadge

Class Overview

Widget used to show an image with the standard QuickContact badge and on-click behavior.

Summary

[Expand]
Inherited XML Attributes
From class android.widget.ImageView
From class android.view.View
[Expand]
Inherited Constants
From class android.view.View
Fields
protected String[] mExcludeMimes
Public Constructors
QuickContactBadge(Context context)
QuickContactBadge(Context context, AttributeSet attrs)
QuickContactBadge(Context context, AttributeSet attrs, int defStyle)
Public Methods
void assignContactFromEmail(String emailAddress, boolean lazyLookup)
Assign a contact based on an email address.
void assignContactFromPhone(String phoneNumber, boolean lazyLookup)
Assign a contact based on a phone number.
void assignContactUri(Uri contactUri)
Assign the contact uri that this QuickContactBadge should be associated with.
void onClick(View v)
Called when a view has been clicked.
void setExcludeMimes(String[] excludeMimes)
Set a list of specific MIME-types to exclude and not display.
void setMode(int size)
Set the QuickContact window mode.
[Expand]
Inherited Methods
From class android.widget.ImageView
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.View.OnClickListener
From interface android.view.accessibility.AccessibilityEventSource

Fields

protected String[] mExcludeMimes

Since: API Level 5

Public Constructors

public QuickContactBadge (Context context)

Since: API Level 5

public QuickContactBadge (Context context, AttributeSet attrs)

Since: API Level 5

public QuickContactBadge (Context context, AttributeSet attrs, int defStyle)

Since: API Level 5

Public Methods

public void assignContactFromEmail (String emailAddress, boolean lazyLookup)

Since: API Level 5

Assign a contact based on an email address. This should only be used when the contact's URI is not available, as an extra query will have to be performed to lookup the URI based on the email.

Parameters
emailAddress The email address of the contact.
lazyLookup If this is true, the lookup query will not be performed until this view is clicked.

public void assignContactFromPhone (String phoneNumber, boolean lazyLookup)

Since: API Level 5

Assign a contact based on a phone number. This should only be used when the contact's URI is not available, as an extra query will have to be performed to lookup the URI based on the phone number.

Parameters
phoneNumber The phone number of the contact.
lazyLookup If this is true, the lookup query will not be performed until this view is clicked.

public void assignContactUri (Uri contactUri)

Since: API Level 5

Assign the contact uri that this QuickContactBadge should be associated with. Note that this is only used for displaying the QuickContact window and won't bind the contact's photo for you.

Parameters
contactUri Either a CONTENT_URI or CONTENT_LOOKUP_URI style URI.

public void onClick (View v)

Since: API Level 5

Called when a view has been clicked.

Parameters
v The view that was clicked.

public void setExcludeMimes (String[] excludeMimes)

Since: API Level 5

Set a list of specific MIME-types to exclude and not display. For example, this can be used to hide the CONTENT_ITEM_TYPE profile icon.

public void setMode (int size)

Since: API Level 5

Set the QuickContact window mode. Options are MODE_SMALL, MODE_MEDIUM, MODE_LARGE.