How to create Button to control background sound.
问题 I'm trying to add background music to my application. All I want is the sound should played on pressing the btnoptn Button and its text transitions into the "music off". The music should continue on any Activity until the settings page is returned to and the same Button is pressed again. The music then stops and the Button text changes to "music on". This my code so far: package hello.english; import hello.english.R; import android.app.Activity; import android.content.Intent; import android