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

前端 未结 11 2109
独厮守ぢ
独厮守ぢ 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:27

    I know this is old but I used this:

        mVideoView.setOnTouchListener(new View.OnTouchListener()
        {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
    
                Log.i(TAG, "Video 1 clicked, starting playback");
    
                return false;
            }
        });
    

提交回复
热议问题