更新时间:2023-02-26 22:27:16
创建一个基本活动,并扩展该基本活动中的所有其他活动,并播放bg音乐或您想要的任何内容
create a base activity and extend all other other activities from base activity and play bg music or whatever you want
public class BaseActivty extends AppCompatActivity{
@Override
protected void onPause() {
super.onPause();
// pause music
}
@Override
protected void onResume() {
super.onResume();
// play music
}
}
public class FirstActivty extends BaseActivty{
// perform other stuff here
}
希望对您有帮助...
hope that will help you...