Class

ClipMetadata

Android specific class that contains the metadata of primary clip in android.content.ClipboardManager

Source set: Android
public class ClipMetadata(public val clipDescription: ClipDescription)

Android specific class that contains the metadata of primary clip in android.content.ClipboardManager

Functions

hasText

Source set: Android
public fun hasText(): Boolean

hasPlainText

Source set: Android
public fun hasPlainText(): Boolean

hasHtml

Source set: Android
public fun hasHtml(): Boolean

hasUrl

Source set: Android
public fun hasUrl(): Boolean
Source set: Common
public class ClipMetadata

Describes the representations a ClipEntry advertises without reading its content.

This is useful for checking whether the clipboard contains compatible data (for example, to determine whether to show or enable a "Paste" button) without triggering platform clipboard access warning.

Functions

hasText

Source set: Common
public fun hasText(): Boolean

Reports whether the clip advertises a text representation. Use ClipEntry.readText to read an available text representation.

hasPlainText

Source set: Common
public fun hasPlainText(): Boolean

Reports whether the clip advertises plain text. Use ClipEntry.readPlainText to read it.

hasHtml

Source set: Common
public fun hasHtml(): Boolean

Reports whether the clip advertises an HTML representation. Use ClipEntry.readHtml to read it.

hasUrl

Source set: Common
public fun hasUrl(): Boolean

Reports whether the clip advertises a URL representation. Use ClipEntry.readUrl to read it.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: