Function

isPressed

isPressed

Source set: Android
public fun PointerButtons.isPressed(buttonIndex: Int): Boolean

isPressed

Source set: Common
public fun PointerButtons.isPressed(buttonIndex: Int): Boolean

Returns true when the button at buttonIndex is pressed and false when it isn't pressed. This method can handle buttons that haven't been assigned a designated purpose like isPrimaryPressed and isSecondaryPressed.

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: