📜  android java string video - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:08.793000             🧑  作者: Mango

代码示例1
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();