Android Guides | Samples

Android.Content.ClipData.Item Class

Description of a single item in a ClippedData.

See Also: ClipData+Item

Syntax

[Android.Runtime.Register("android/content/ClipData$Item", DoNotGenerateAcw=true)]
public class ClipData.Item : Object

Remarks

Description of a single item in a ClippedData.

  • Text: a basic string of text. This is actually a CharSequence, so it can be formatted text supported by corresponding Android built-in style spans. (Custom application spans are not supported and will be stripped when transporting through the clipboard.)
  • Intent: an arbitrary Intent object. A typical use is the shortcut to create when pasting a clipped item on to the home screen.
  • Uri: a URI reference. This may be any URI (such as an http: URI representing a bookmark), however it is often a content: URI. Using content provider references as clips like this allows an application to share complex or large clips through the standard content provider facilities.

The types than an individual item can currently contain are:

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11

The members of Android.Content.ClipData.Item are listed below.

See Also: Object

Public Constructors

Create an Item consisting of an arbitrary Intent.
Create an Item consisting of an arbitrary URI.
Create an Item consisting of a single block of (possibly styled) text.
Create an Item consisting of a single block of (possibly styled) text.
Create an Item consisting of a single block of (possibly styled) text, with an alternative HTML formatted representation.
Create an Item consisting of a single block of (possibly styled) text, with an alternative HTML formatted representation.
Create a complex Item, containing multiple representations of text, Intent, and/or URI.
Create a complex Item, containing multiple representations of text, Intent, and/or URI.
Create a complex Item, containing multiple representations of text, HTML text, Intent, and/or URI.
Create a complex Item, containing multiple representations of text, HTML text, Intent, and/or URI.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
HtmlTextString. Retrieve the raw HTML text contained in this Item.
[read-only]
IntentIntent. Retrieve the raw Intent contained in this Item.
[read-only]
TextString.
[read-only]
TextFormattedICharSequence. Retrieve the raw text contained in this Item.
[read-only]
UriUri. Retrieve the raw URI contained in this Item.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

CoerceToHtmlText(Context) : String
Turn this item into HTML text, regardless of the type of data it actually contains.
CoerceToStyledText(Context) : String
CoerceToStyledTextFormatted(Context) : ICharSequence
Like ClipData+Item.CoerceToHtmlText(Context), but any text that would be returned as HTML formatting will be returned as text with style spans.
CoerceToText(Context) : String
CoerceToTextFormatted(Context) : ICharSequence
Turn this item into text, regardless of the type of data it actually contains.