- Text
- URI
- Intent
* The clipboard holds only one clip object at a time. When an application puts a clip object on the clipboard, the previous clip object disappears.
* To add data to the clipboard, you create a ClipData object that contains
- A description of the data: A ClipDescription object.
- The data itself: One or more ClipData.Item objects.
* A ClipDescription object
- Contains an array of available MIME types for the clip's data: when you put a clip on the clipboard, this array is available to pasting applications, which can examine it to see if they can handle any of available the MIME types.
* To copy data
- An application puts a ClipData object on the ClipboardManager global clipboard.
- The ClipData contains one or more ClipData.Item objects and one ClipDescription object.
* To paste data
- An application gets the ClipData, gets its MIME type from the ClipDescription
- And gets the data either from the ClipData.Item or from the content provider referred to by ClipData.Item.
* You should verify that the clipboard contains a clip and that you can handle the type of data represented by the clip.
* Reference
- Copy and Paste
沒有留言:
張貼留言