My android apps have a regular button:
<Button android:id="@+id/allOnButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="130dp" android:text="@string/sensor_management_all_on" />
And the switch button:
<ToggleButton android:id="@+id/accelerometerToggleButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:checked="true" android:textOff="off" android:textOn="on" />
When the button is pressed, a pleasant βclickβ sound is played, which gives good feedback to the user that the button has been pressed.
How to set click sound for ToggleButton?
source share