我有一个活动(A),它有一个VideoView。我用onPrepareListener设置视频视图。当我从A开始新活动(B)之后,我从B回到A,onPrepared中的所有元素都被称为???为什么会这样?所以我很抱歉我的英语不好,谢谢你:D
textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(getBaseContext(), SecondActivity.class));
}
});
mVideoView = (VideoView) findViewById(R.id.video_view);
mVideoView.setVideoPath(
"/storage/emulated/0/Download/Charlize Theron's Variety Cover Shoot - Behind the Scenes.3gpp");
mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer m) {
Log.i("test", m.toString());
}
});