How to disable click sound of a particular button in Android app?
Here is my code:
more1after.setOnClickListener(new OnClickListener() { public void onClick(View v) { sc.scrollTo(sc.getScrollX() + 75, sc.getScrollY() + sc.getWidth() + 5); } });
Tap Settings . Tap Notifications. Turn Disable sounds & vibrations on or off. Tap Disable sounds & vibrations to your desired Start time and End time.
Touch sounds, are the clicking noises you hear every time you tap something on the screen. You also might want to turn off Vibrate on tap to save some battery, Screen locking sounds since they're pointless, and Dial pad tones so your phone doesn't sound like it's from 40 years ago when you call someone. ALexus.
The actual solution to this problem is to use setEnabled(false) which greys out the button, and setClickable(false) which makes it so the second click can not be received I have tested this and it seem to be very effective.
Try this code for disable button click sound effect:
yourbutton.setSoundEffectsEnabled(false);
(or) Layout XML file
<Button... android:soundEffectsEnabled="false"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With