Package-level declarations

Types

Link copied to clipboard
class DpadComposeFocusViewHolder<T>(parent: ViewGroup, compositionStrategy: ViewCompositionStrategy = RecyclerViewCompositionStrategy.DisposeOnRecycled, isFocusable: Boolean = true, content: @Composable (item: T) -> Unit = {}) : RecyclerView.ViewHolder

Similar to DpadComposeViewHolder, but sends the focus down to composables

Link copied to clipboard
class DpadComposeViewHolder<T>(parent: ViewGroup, onClick: (item: T) -> Unit? = null, onLongClick: (item: T) -> Boolean? = null, isFocusable: Boolean = true, compositionStrategy: ViewCompositionStrategy = RecyclerViewCompositionStrategy.DisposeOnRecycled, content: @Composable (item: T, isFocused: Boolean) -> Unit = { _, _ -> }) : RecyclerView.ViewHolder

A basic ViewHolder that forwards content to a ComposeView and handles focus and clicks inside the View system.

Functions

Link copied to clipboard
fun Modifier.dpadClickable(enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onLongClick: () -> Unit? = null, onClick: () -> Unit?): Modifier

Similar to Modifier.clickable, but handles only AcceptableKeys and triggers a sound effect on click. Workaround for: https://issuetracker.google.com/issues/268268856