2010-11-18 135 views
0

我是初學者,我有兩個問題。android - 在視頻運行時檢測屏幕上的觸摸

  1. 爲什麼附加代碼中的視頻沒有運行(從仿真器獲取消息,指出應用程序無法運行視頻)。

  2. 任何人都可以請幫我理解我應該如何實現onTouchEvent,以便在視頻運行時捕捉屏幕上的觸摸(不關心屏幕上的哪個部分)。

在此先感謝 Amihay

公共類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(); 

} 

}

回答

相關問題