0

我是初学者,我有两个问题。

  1. 为什么附加代码中的视频没有运行(从模拟器中获取应用程序无法运行视频的消息)。

  2. 谁能帮我理解我应该如何实现 onTouchEvent 以便在视频运行时捕捉屏幕上的触摸(不在乎屏幕上的位置)。

在此先感谢阿米海

公共类 VidShow 扩展活动 {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.videoscrn);

/*run the video*/
VideoView video = (VideoView) findViewById(R.id.video);

// Load and start the movie
video.setVideoPath("raw/samplevideo.3gp" );
video.start();

}

}

4

1 回答 1

1

扩展 VideoView 并实现VideoView.onTouchEvent(..).

于 2010-11-18T15:05:06.017 回答