I have written these lines of code:
mVideoView = (VideoView) findViewById(R.id.video_view);
mVideoView.setOnClickListener(new OnClickListener() {
@O
It is possible I have did this with onSetClickListener. And Here's a code for your help:
mVideoView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
//Here you put a condition for playing a video when you click on your video view.//
if(my_video.isPressed())
{
my_video.start();
} else {
Toast.makeText(getApplicationContext(),
"Not able to run This Video!",
Toast.LENGTH_LONG).show();
}
}
});