📅  最后修改于: 2022-03-11 14:52:08.793000             🧑  作者: Mango
VideoView videoView = (VideoView) findViewById(R.id.videoView);
videoView.setVideoPath("android.resource://" + getPackageName() + "/" + R.raw.demovideo);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
videoView.setMediaController(mediaController);
videoView.start();