Interface

TextContextMenuDataProvider

Provides the data necessary to show the text context menu.

Source set: Common
public interface TextContextMenuDataProvider

Provides the data necessary to show the text context menu.

All functions on this interface are expected to be snapshot-aware.

Functions

position

Source set: Common
public fun position(destinationCoordinates: LayoutCoordinates): Offset

Provides the position to place the context menu around. The position should be relative to the provided destinationCoordinates.

This function is snapshot-aware.

contentBounds

Source set: Common
public fun contentBounds(destinationCoordinates: LayoutCoordinates): Rect

Provides a bounding box to place the context menu around. The position should be relative to the provided destinationCoordinates.

This function is snapshot-aware.

data

Source set: Common
public fun data(): TextContextMenuData

Provides the components used to fill the context menu.

This function is snapshot-aware.

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: