PhoneNumberPicker
Definition
A button that, when clicked on, displays a list of the contacts’ phone numbers to choose among. After the user has made a selection, the following properties will be set to information about the chosen contact:
ContactName
: the contact’s namePhoneNumber
: the contact’s phone numberEmailAddress
: the contact’s email addressPicture
: the name of the file containing the contact’s image, which can be used as a Picture property value for the Image or ImageSprite component.
Other properties affect the appearance of the button (TextAlignment
, BackgroundColor
, etc.) and whether it can be clicked on (Enabled
).
The PhoneNumberPicker
component may not work on all Android devices. For example, on Android systems before system 3.0, the returned lists of phone numbers and email addresses will be empty.
Properties
- BackgroundColor
- Specifies the
PhoneNumberPicker
’s background color as an alpha-red-green-blue integer. If anImage
has been set, the color change will not be visible until theImage
is removed. - ContactName
- Returns the full name of the selected contact, or the empty string if a name is unavailable.
- ContactUri
- Returns a URI that specifies the location of the contact on the device.
- EmailAddress
- Returns the primary email address of the selected contact, or the empty string if an email address is unavailable.
- EmailAddressList
- Returns a list of email addresses associated with the selected contact.
- Enabled
- Specifies whether the
PhoneNumberPicker
should be active and clickable. - FontBold
- Specifies whether the text of the
PhoneNumberPicker
should be bold. Some fonts do not support bold. - FontItalic
- Specifies whether the text of the
PhoneNumberPicker
should be italic. Some fonts do not support italic. - FontSize
- Specifies the text font size of the
PhoneNumberPicker
, measured in sp(scale-independent pixels). - FontTypeface
- Specifies the text font face of the
PhoneNumberPicker
as default, serif, sans serif, or monospace. - Height
- Specifies the
PhoneNumberPicker
’s vertical height, measured in pixels. - HeightPercent
- Specifies the
PhoneNumberPicker
’s vertical height as a percentage of theScreen
’sHeight
. - Image
- Specifies the path of the
PhoneNumberPicker
’s image. If there is both anImage
and aBackgroundColor
specified, only theImage
will be visible. - PhoneNumber
- Returns the primary phone number associated with the selected contact, or the empty string if no phone number is associated with the contact.
- PhoneNumberList
- Returns a list of phone numbers associated with the selected contact.
- Picture
- Returns a picture URI for the selected contact, which can be used to retrieve the contact’s photo and other fields.
- Shape
- Specifies the shape of the
PhoneNumberPicker
. The valid values for this property are0
(default),1
(rounded),2
(rectangle), and3
(oval). TheShape
will not be visible if anImage
is used. - ShowFeedback
- Specifies if a visual feedback should be shown when a
PhoneNumberPicker
with an assignedImage
is pressed. - Text
- Specifies the text displayed by the
PhoneNumberPicker
. - TextAlignment
- Specifies the alignment of the
PhoneNumberPicker
’s text. Valid values are:0
(normal; e.g., left-justified if text is written left to right),1
(center), or2
(opposite; e.g., right-justified if text is written left to right). - TextColor
- Specifies the text color of the
PhoneNumberPicker
as an alpha-red-green-blue integer. - Visible
- Specifies whether the
PhoneNumberPicker
should be visible on the screen. Value istrue
if thePhoneNumberPicker
is showing andfalse
if hidden. - Width
- Specifies the horizontal width of the
PhoneNumberPicker
, measured in pixels. - WidthPercent
- Specifies the horizontal width of the
PhoneNumberPicker
as a percentage of theScreen
’sWidth
.