I have never decompiled the WeChat APK, and I am not sure what WeChat uses to implement it. Button has a click sound by default, and of course system manufacturers can also customize it. There are a few points to pay attention to for this type of demand 1. Whether the system allows touch feedback and sound is turned on; 2. Whether your View intercepts the onTouch event; 3. RadioButton and CheckBox should not have click sound effects (I have not verified it exactly Pass). If you want to have sound and it is available on all platforms, just customize it
I have never decompiled the WeChat APK, and I am not sure what WeChat uses to implement it. Button has a click sound by default, and of course system manufacturers can also customize it. There are a few points to pay attention to for this type of demand
1. Whether the system allows touch feedback and sound is turned on;
2. Whether your View intercepts the onTouch event;
3. RadioButton and CheckBox should not have click sound effects (I have not verified it exactly Pass).
If you want to have sound and it is available on all platforms, just customize it
Android control has a property
android:soundEffectsEnabled to set whether there are sound effects when clicked or touched
Add a sound effect yourself. . . That’s it