我正在尝试在我的应用程序的 GUI 上设置一个简单的静音按钮。选择时:1. 再次选择时静音媒体音量,2. 取消静音媒体音量
我是 Java 新手。我不知道要导入哪个包或哪个语句最适合这个。这是我到目前为止所拥有的:
//Mute Button
    btnMute = (Button)findViewById(R.id.wmute);
按钮 XML:
<Button
        android:id="@+id/wmute"
        style="?android:attr/buttonStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Mute" />