1

I click on item of listview to play video: Code:

Intent intent = new Intent(E030.this, EPlayVideo.class);
Bundle b = new Bundle();
b.putString("File", dt.FileName);
intent.putExtras(b);
startActivity(intent);

Code play video in EPlayVideo.java :

protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layoutplayvideo);

        try {
            VideoView videoView = (VideoView) findViewById(R.id.videoView1);
            Intent outintent = getIntent();
            Bundle b = outintent.getExtras();
            String file = b.getString("File");
            MediaController mediaController = new MediaController(EPlayVideo.this);
            mediaController.setAnchorView(videoView);
            videoView.setMediaController(mediaController);
            videoView.setVideoPath(file);
            videoView.setRotation(90);
            videoView.start();

        } catch (Exception e) {
            // TODO: handle exception
        }

    }

Result: Why screen can't clear before play video by VideoView?

enter image description here

mum
  • 1,637
  • 11
  • 34
  • 58

0 Answers0