I am trying to setup a simple mute button on the GUI of my app. Which when selected:
1. mutes the Media Volume
an when selected again,
2. unmutes the Media Volume
I am new to Java. I don’t know what bundle to import or which statement is best for this.
Here’s what I have so far:
//Mute Button
btnMute = (Button)findViewById(R.id.wmute);
Button XML:
<Button
android:id="@+id/wmute"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Mute" />
selected: 1
selected: 2