Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working onClickListener #8

Open
hope4T opened this issue Feb 22, 2018 · 3 comments
Open

Not working onClickListener #8

hope4T opened this issue Feb 22, 2018 · 3 comments

Comments

@hope4T
Copy link

hope4T commented Feb 22, 2018

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
        }
    });
@martinwithaar
Copy link
Owner

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.

@hixfield
Copy link

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

@EleshBaraiya
Copy link

Can you update click event in master and update versoin ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants