Android: Why can't I give an onClickListener to a VideoView?

Fabian picture Fabian · May 30, 2011 · Viewed 28.3k times · Source

I have written these lines of code:

 mVideoView = (VideoView) findViewById(R.id.video_view);
    mVideoView.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            Log.v("LOG_TAG, click");
        }
    });

However, when I run my application, the click event is never called.

So I wonder, is it impossible to register an OnClickListener on a VideoView? And, if so, why is that the case?

Answer

newdev picture newdev · Jun 30, 2011

use VideoView.setOnTouchListener(..) it works for VideoView