Add haptic feedback#106
Merged
Merged
Conversation
Add a soft frequent tick to the sleep slider so dragging it matches the +/- steppers, using SEGMENT_FREQUENT_TICK which is tuned to stay soft across many steps in quick succession. Confirm on the dose dialog submit for parity with the note and category dialogs. Drop the buzz when the mood picker opens, since opening a popover is not a predefined haptic action and no other button in the app cues on open.
No long-press gesture occurs, so the predefined Confirm constant that signals a completed action is the accurate fit. Drops the now-unused LongPress helper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A small haptics service (
Data/HapticFeedbackService.cs) that plays predefined AndroidHapticFeedbackConstantson discrete, meaningful interactions. Singleton, shared with the tests, no-op off Android.Where it fires:
Nothing on scrolling, typing (the keyboard handles its own), or plain navigation.
It goes through
View.PerformHapticFeedback, so noVIBRATEpermission and it honors the system touch-feedback setting. The API 30/34 constants fall back to older ones down to our min SDK of 27. Controls hookValueChangedinstead of@bind-Value:afterto keep logic out of setters.