Improved vibration feedback on both ACTION_DOWN and ACTION_UP#577
Improved vibration feedback on both ACTION_DOWN and ACTION_UP#577Manash396 wants to merge 7 commits intoclementwzk:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR improves vibration feedback for calculator buttons by implementing custom touch listeners that trigger vibration on ACTION_DOWN events instead of relying on default haptic feedback. This provides more immediate tactile response when users touch calculator buttons.
- Added custom touch listeners to all calculator buttons for improved vibration feedback timing
- Implemented helper functions to apply vibration consistently across all button types
- Added MotionEvent import to support touch event handling
Comments suppressed due to low confidence (2)
app/src/main/java/com/darkempire78/opencalculator/activities/MainActivity.kt:118
- The function name 'setOnBottontouchlistener' should follow camelCase convention and be more descriptive. Consider renaming to 'setupButtonTouchListeners'.
setOnBottontouchlistener()
app/src/main/java/com/darkempire78/opencalculator/activities/MainActivity.kt:328
- The function name 'setOnBottontouchlistener' should follow camelCase convention and be more descriptive. Consider renaming to 'setupButtonTouchListeners'.
private fun setOnBottontouchlistener() {
| applyVibrationToKey(binding.piButton) | ||
| applyVibrationToKey(binding.exponentButton) | ||
| applyVibrationToKey(binding.factorialButton) | ||
| applyVibrationToKey(binding.squareButton) |
There was a problem hiding this comment.
Duplicate call to applyVibrationToKey(binding.squareButton). This button is configured twice on lines 329 and 333.
| applyVibrationToKey(binding.squareButton) |
| applyVibrationToKey(binding.exponentButton) | ||
| applyVibrationToKey(binding.factorialButton) | ||
| applyVibrationToKey(binding.squareButton) | ||
| applyVibrationToKey(binding.piButton) |
There was a problem hiding this comment.
Duplicate call to applyVibrationToKey(binding.piButton). This button is configured twice on lines 330 and 334.
| applyVibrationToKey(binding.piButton) |
| applyVibrationToKey(binding.factorialButton) | ||
| applyVibrationToKey(binding.squareButton) | ||
| applyVibrationToKey(binding.piButton) | ||
| applyVibrationToKey(binding.exponentButton) |
There was a problem hiding this comment.
Duplicate call to applyVibrationToKey(binding.exponentButton). This button is configured twice on lines 331 and 335.
| applyVibrationToKey(binding.exponentButton) |
| applyVibrationToKey(binding.squareButton) | ||
| applyVibrationToKey(binding.piButton) | ||
| applyVibrationToKey(binding.exponentButton) | ||
| applyVibrationToKey(binding.factorialButton) |
There was a problem hiding this comment.
Duplicate call to applyVibrationToKey(binding.factorialButton). This button is configured twice on lines 332 and 336.
| applyVibrationToKey(binding.factorialButton) |
|
@Manash396 can you fix the issues please, so i can merge your PR |
|
yes , of cource
…On Sun, Sep 21, 2025 at 7:18 PM Clément Wawszczyk ***@***.***> wrote:
*clementwzk* left a comment (clementwzk/OpenCalc#577)
<#577 (comment)>
@Manash396 <https://github.com/Manash396> can you fix the issues please,
so i can merge your PR
—
Reply to this email directly, view it on GitHub
<#577 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJEAMQ5C4AJCROYXG4PJPET3T2UDTAVCNFSM6AAAAACBZUIOACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMJWGAYDOMZVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…roved-vibration-feedback # Conflicts: # app/src/main/java/com/darkempire78/opencalculator/activities/MainActivity.kt
|
I have made those changes you requested
On Mon, Sep 22, 2025 at 7:20 AM Manash Khatowal ***@***.***>
wrote:
… yes , of cource
On Sun, Sep 21, 2025 at 7:18 PM Clément Wawszczyk <
***@***.***> wrote:
> *clementwzk* left a comment (clementwzk/OpenCalc#577)
> <#577 (comment)>
>
> @Manash396 <https://github.com/Manash396> can you fix the issues please,
> so i can merge your PR
>
> —
> Reply to this email directly, view it on GitHub
> <#577 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BJEAMQ5C4AJCROYXG4PJPET3T2UDTAVCNFSM6AAAAACBZUIOACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMJWGAYDOMZVGI>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
…roved-vibration-feedback
…sh396/OpenCalc into improved-vibration-feedback
|
Why was this never merged? |
No description provided.