My android apps has 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 a toggle 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 nice "click" sound is played, which gives a good feedback to the user that the button was actually pressed.
How do I set a click sound for the ToggleButton?