我需要在视频停止后循环播放视频。我使用了以下代码。它在三星手机中工作正常,但它不能在HCL Me U2 Tablet中工作。我正在粘贴下面的代码:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
Video=(VideoView)findViewById(R.id.mVideoview);
Video.setVideoPath("/sdcard/Video/Video.mp4");
Video.setMediaController(new MediaController(this));
Video.requestFocus();
Video.start();
Video.setOnPreparedListener(this);
}
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
请立即帮我!!!