我正在使用Media player App,当我从列表中选择一首歌时,它可以正常播放,但当我选择另一首歌时,第一首歌不会停止播放。我尝试finish();但不起作用。它的一个播放器布局资源文件和多个Java类。
public void s2 (View view){
Intent intent = new Intent(s1.this, s2.class);
startActivity(intent);
this.finish();
}发布于 2020-08-26 15:37:26
如果使用MediaPlayer类播放歌曲,则应将player.stop()调用添加到活动析构函数中。
https://stackoverflow.com/questions/63588224
复制相似问题