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

前端 未结 11 2129
独厮守ぢ
独厮守ぢ 2021-02-03 17:08

I have written these lines of code:

 mVideoView = (VideoView) findViewById(R.id.video_view);
    mVideoView.setOnClickListener(new OnClickListener() {
        @O         


        
11条回答
  •  生来不讨喜
    2021-02-03 17:38

    This is probably long overdue, nonetheless of some help to those who may run into a similar problem. The way I got around this problem was by laying a transparent image view right on top of the video view, then listening to onClick events on the image view, and doing whatever it was I wanted to do with the video view afterwards.

提交回复
热议问题