public class

ClipboardManager

extends Object
java.lang.Object
   ↳ android.text.ClipboardManager

Class Overview

Interface to the clipboard service, for placing and retrieving text in the global clipboard.

You do not instantiate this class directly; instead, retrieve it through getSystemService(String).

Summary

Public Methods
CharSequence getText()
Returns the text on the clipboard.
boolean hasText()
Returns true if the clipboard contains text; false otherwise.
void setText(CharSequence text)
Sets the contents of the clipboard to the specified text.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public CharSequence getText ()

Since: API Level 1

Returns the text on the clipboard. It will eventually be possible to store types other than text too, in which case this will return null if the type cannot be coerced to text.

public boolean hasText ()

Since: API Level 1

Returns true if the clipboard contains text; false otherwise.

public void setText (CharSequence text)

Since: API Level 1

Sets the contents of the clipboard to the specified text.