clickable
Source set: JvmAndAndroid
public fun RemoteModifier.clickable(
onClick: RemoteAction,
enabled: Boolean = true,
role: RemoteRole? = null,
): RemoteModifier
Configure component to receive clicks via input or accessibility "click" event.
Add this modifier to the element to make it clickable within its bounds.
If you need to support double click or long click alongside the single click, consider using combinedClickable.
Example of toggling remote state when an element is clicked:
Parameters
| onClick | will be called when user clicks on the element |
| enabled | Controls the enabled state. When false, onClick, and this modifier will appear disabled for accessibility services |
| role | the type of user interface element. Accessibility services might use this to describe the element or do customizations. By default, no role is set (null). |
Return
a RemoteModifier that makes the component clickable