-
-
Notifications
You must be signed in to change notification settings - Fork 173
Improved vibration feedback on both ACTION_DOWN and ACTION_UP #577
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
190348b
8c2de6c
d62fbb6
d5b131a
1e7903d
ee8cb5c
91bbfb2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -14,6 +14,7 @@ import android.text.TextWatcher | |||
| import android.util.Log | ||||
| import android.view.HapticFeedbackConstants | ||||
| import android.view.MenuItem | ||||
| import android.view.MotionEvent | ||||
| import android.view.View | ||||
| import android.view.WindowManager | ||||
| import android.view.accessibility.AccessibilityEvent | ||||
|
|
@@ -98,6 +99,7 @@ class MainActivity : AppCompatActivity() { | |||
| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | ||||
| ) | ||||
|
|
||||
|
|
||||
| // Themes | ||||
| val themes = Themes(this) | ||||
| themes.applyDayNightOverride() | ||||
|
|
@@ -112,6 +114,9 @@ class MainActivity : AppCompatActivity() { | |||
| view = binding.root | ||||
| setContentView(view) | ||||
|
|
||||
| // set buttons on touch listener to get feedback vibration on touch | ||||
| setOnBottontouchlistener() | ||||
|
|
||||
| // Disable the keyboard on display EditText | ||||
| binding.input.showSoftInputOnFocus = false | ||||
|
|
||||
|
|
@@ -320,6 +325,61 @@ class MainActivity : AppCompatActivity() { | |||
|
|
||||
| } | ||||
|
|
||||
| private fun setOnBottontouchlistener() { | ||||
| applyVibrationToKey(binding.squareButton) | ||||
| applyVibrationToKey(binding.piButton) | ||||
| applyVibrationToKey(binding.exponentButton) | ||||
| applyVibrationToKey(binding.factorialButton) | ||||
| applyVibrationToKey(binding.squareButton) | ||||
| applyVibrationToKey(binding.piButton) | ||||
|
||||
| applyVibrationToKey(binding.piButton) |
Copilot
AI
Jul 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate call to applyVibrationToKey(binding.exponentButton). This button is configured twice on lines 331 and 335.
| applyVibrationToKey(binding.exponentButton) |
Copilot
AI
Jul 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate call to applyVibrationToKey(binding.factorialButton). This button is configured twice on lines 332 and 336.
| applyVibrationToKey(binding.factorialButton) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate call to applyVibrationToKey(binding.squareButton). This button is configured twice on lines 329 and 333.