public class ContactPicker extends Picker implements ActivityResultListener
Modifier and Type | Field and Description |
---|---|
protected android.app.Activity |
activityContext |
protected java.lang.String |
contactName |
protected java.lang.String |
contactPictureUri |
protected java.lang.String |
emailAddress |
protected java.util.List |
emailAddressList |
protected java.lang.String |
phoneNumber |
protected java.util.List |
phoneNumberList |
container, requestCode
ACCELEROMETER_SENSITIVITY_MODERATE, ACCELEROMETER_SENSITIVITY_STRONG, ACCELEROMETER_SENSITIVITY_WEAK, ALIGNMENT_CENTER, ALIGNMENT_NORMAL, ALIGNMENT_OPPOSITE, ASSET_DIRECTORY, BUTTON_SHAPE_DEFAULT, BUTTON_SHAPE_OVAL, BUTTON_SHAPE_RECT, BUTTON_SHAPE_ROUNDED, COLOR_BLACK, COLOR_BLUE, COLOR_CYAN, COLOR_DEFAULT, COLOR_DKGRAY, COLOR_GRAY, COLOR_GREEN, COLOR_LTGRAY, COLOR_MAGENTA, COLOR_NONE, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_WHITE, COLOR_YELLOW, DEFAULT_VALUE_COLOR_BLACK, DEFAULT_VALUE_COLOR_BLUE, DEFAULT_VALUE_COLOR_CYAN, DEFAULT_VALUE_COLOR_DEFAULT, DEFAULT_VALUE_COLOR_DKGRAY, DEFAULT_VALUE_COLOR_GRAY, DEFAULT_VALUE_COLOR_GREEN, DEFAULT_VALUE_COLOR_LTGRAY, DEFAULT_VALUE_COLOR_MAGENTA, DEFAULT_VALUE_COLOR_NONE, DEFAULT_VALUE_COLOR_ORANGE, DEFAULT_VALUE_COLOR_PINK, DEFAULT_VALUE_COLOR_RED, DEFAULT_VALUE_COLOR_WHITE, DEFAULT_VALUE_COLOR_YELLOW, DIRECTION_EAST, DIRECTION_MAX, DIRECTION_MIN, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_NORTHEAST, DIRECTION_NORTHWEST, DIRECTION_SOUTH, DIRECTION_SOUTHEAST, DIRECTION_SOUTHWEST, DIRECTION_WEST, FONT_DEFAULT_SIZE, LAYOUT_ORIENTATION_HORIZONTAL, LAYOUT_ORIENTATION_VERTICAL, LENGTH_FILL_PARENT, LENGTH_PREFERRED, LENGTH_UNKNOWN, SLIDER_MAX_VALUE, SLIDER_MIN_VALUE, SLIDER_THUMB_VALUE, TOAST_LENGTH_LONG, TOAST_LENGTH_SHORT, TYPEFACE_DEFAULT, TYPEFACE_MONOSPACE, TYPEFACE_SANSSERIF, TYPEFACE_SERIF
Modifier | Constructor and Description |
---|---|
|
ContactPicker(ComponentContainer container)
Create a new ContactPicker component.
|
protected |
ContactPicker(ComponentContainer container,
android.net.Uri intentUri) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkContactUri(android.net.Uri suspectUri,
java.lang.String requiredPattern) |
java.lang.String |
ContactName()
Name property getter method.
|
java.lang.String |
EmailAddress()
EmailAddress property getter method.
|
java.util.List |
EmailAddressList()
EmailAddressList property getter method.
|
protected java.util.List |
ensureNotNull(java.util.List value) |
protected java.lang.String |
ensureNotNull(java.lang.String value) |
protected java.lang.String |
getEmailAddress(java.lang.String emailId)
Email address getter for pre-Honeycomb.
|
protected android.content.Intent |
getIntent()
Provides the Intent used to launch the picker activity.
|
protected java.lang.String |
guardCursorGetString(android.database.Cursor cursor,
int index) |
java.lang.String |
PhoneNumber()
PhoneNumber property getter method.
|
java.util.List |
PhoneNumberList()
PhoneNumberList property getter method.
|
java.lang.String |
Picture()
Picture URI for this contact, which can be
used to retrieve the contact's photo and other fields.
|
void |
postHoneycombGetContactEmailAndPhone(android.database.Cursor dataCursor)
Assigns emailAddress, phoneNumber, emailAddressList, and phoneNumberList
for Honeycomb and up.
|
java.lang.String |
postHoneycombGetContactNameAndPicture(android.database.Cursor contactCursor)
Assigns contactName and contactPictureUri for Honeycomb and up.
|
void |
preHoneycombGetContactInfo(android.database.Cursor contactCursor,
android.net.Uri contactUri)
For versions before Honeycomb, we get all the contact info from the same table.
|
protected void |
puntContactSelection(int errorNumber) |
void |
resultReturned(int requestCode,
int resultCode,
android.content.Intent data)
Callback method to get the result returned by the contact picker activity
|
AfterPicking, BeforePicking, click, Open
BackgroundColor, BackgroundColor, Enabled, Enabled, FontBold, FontBold, FontItalic, FontItalic, FontSize, FontSize, FontTypeface, FontTypeface, getView, GotFocus, Image, Image, longClick, LostFocus, onClick, onFocusChange, onLongClick, onTouch, Shape, Shape, ShowFeedback, ShowFeedback, Text, Text, TextAlignment, TextAlignment, TextColor, TextColor, TouchDown, TouchUp
Column, Column, CopyHeight, CopyWidth, getDispatchDelegate, Height, Height, Row, Row, Visible, Visible, Width, Width
protected final android.app.Activity activityContext
protected java.lang.String contactName
protected java.lang.String emailAddress
protected java.lang.String contactPictureUri
protected java.lang.String phoneNumber
protected java.util.List emailAddressList
protected java.util.List phoneNumberList
public ContactPicker(ComponentContainer container)
container
- the parent container.protected ContactPicker(ComponentContainer container, android.net.Uri intentUri)
public java.lang.String Picture()
public java.lang.String ContactName()
public java.lang.String EmailAddress()
public java.util.List EmailAddressList()
public java.lang.String PhoneNumber()
public java.util.List PhoneNumberList()
protected android.content.Intent getIntent()
Picker
public void resultReturned(int requestCode, int resultCode, android.content.Intent data)
resultReturned
in interface ActivityResultListener
requestCode
- a code identifying the request.resultCode
- a code specifying success or failure of the activitydata
- the returned data, in this case an Intent whose data field
contains the contact's content provider Uri.public void preHoneycombGetContactInfo(android.database.Cursor contactCursor, android.net.Uri contactUri)
public java.lang.String postHoneycombGetContactNameAndPicture(android.database.Cursor contactCursor)
public void postHoneycombGetContactEmailAndPhone(android.database.Cursor dataCursor)
protected boolean checkContactUri(android.net.Uri suspectUri, java.lang.String requiredPattern)
protected void puntContactSelection(int errorNumber)
protected java.lang.String getEmailAddress(java.lang.String emailId)
protected java.lang.String guardCursorGetString(android.database.Cursor cursor, int index)
protected java.lang.String ensureNotNull(java.lang.String value)
protected java.util.List ensureNotNull(java.util.List value)