Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds long and double-click support to Button and Card #2021

Merged
merged 12 commits into from
Feb 10, 2024
Merged

Conversation

garanj
Copy link
Collaborator

@garanj garanj commented Feb 2, 2024

(Credit to @yschimke for much of the work)

WHAT

Adds onLongClick and onDoubleClick support to Card and Button

WHY

These are not provided by default in the Wear Compose implementation, but are useful in a number of scenarios.

HOW

Custom Card and Button implementations, using Box to handle the long and double-click interactions.

Checklist 📋

  • Add explicit visibility modifier and explicit return types for public declarations
  • Run spotless check
  • Run tests
  • Update metalava's signature text files

@garanj garanj requested a review from yschimke February 2, 2024 14:01
@luizgrp luizgrp requested a review from Kpeved February 2, 2024 14:12
@yschimke yschimke closed this Feb 2, 2024
@yschimke yschimke reopened this Feb 2, 2024
@garanj
Copy link
Collaborator Author

garanj commented Feb 6, 2024

Had a stab at improving the Compose semantics handling

@yschimke yschimke closed this Feb 6, 2024
@yschimke yschimke reopened this Feb 6, 2024
onDoubleClick = onDoubleClick,
role = role,
)
.padding(contentPadding),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@yschimke yschimke closed this Feb 10, 2024
@yschimke yschimke reopened this Feb 10, 2024
@yschimke yschimke enabled auto-merge (squash) February 10, 2024 14:54
@yschimke yschimke merged commit 5747bfa into main Feb 10, 2024
4 checks passed
@yschimke yschimke deleted the clickable branch February 10, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants