PinchToZoom icon indicating copy to clipboard operation
PinchToZoom copied to clipboard

Not working onClickListener

Open hope4T opened this issue 6 years ago • 3 comments

I tried to detect onClick event on imageView, but it is not working. How can I fix this issue?

Here is my code.

ImageMatrixTouchHandler imageMatrixTouchHandler = new ImageMatrixTouchHandler(imageView.getContext()); imageView.setOnTouchListener(imageMatrixTouchHandler);

    imageView.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            //do something
        }
    });

hope4T avatar Feb 22 '18 09:02 hope4T

I have pushed functionality for this to the develop branch. Add this line when you set a click listener to the image view:

imageMatrixTouchHandler.setConsumeTouchEvent(false);

All touch events should be available for click detection like this. The resulting behavior is however quite buggy. I'm looking into ways for making it work better.

martinwithaar avatar Apr 27 '18 21:04 martinwithaar

@martinwithaar any update on this? When will this be "generally" available?

hixfield avatar Aug 13 '19 19:08 hixfield

Can you update click event in master and update versoin ?

EleshBaraiya avatar Jul 01 '20 10:07 EleshBaraiya