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

Cannot use setOnTouchListener #11

Open
africantearoa opened this issue Jul 23, 2017 · 2 comments
Open

Cannot use setOnTouchListener #11

africantearoa opened this issue Jul 23, 2017 · 2 comments

Comments

@africantearoa
Copy link
Contributor

africantearoa commented Jul 23, 2017

Using .setOnTouchListener() on the ImagePopup object does not seem to work - the the code within the OnTouchListener is never reached.

To try counter this, I tried manually pulling the files from this repository and creating my own custom ImagePopup class, adding the .setOnTouchListener() to the 'layout' field object. While that did execute the code correctly, the popup wouldn't go fullscreen so I abandoned whole custom class.
I'm a rookie at this, anyone know what I might be doing wrong? Would being able to access the layout field within the ImagePopup object in order to add the .setOnTouchListener() directly to it be bad code? I'm guessing that would solve my issue, at least.

what I'm trying to do:

                            imagePopup.setOnTouchListener(new View.OnTouchListener() {
                                @Override
                                public boolean onTouch(View v, MotionEvent event) {
                                    //This code is never reached
                                    return false;
                                }
                            });

Also, what I'm aiming to do is when the user scrolls up or down on the imagePopup, the image source changes, creating a controllable gif-like effect. Provided I figure out how to detect the scroll, is there a way to change the image source in this manner?

@chathuralakmal
Copy link
Owner

@africantearoa yes the code is not support for touchListener yet. and in default popup doesnt go full screen. you can see it in the popup window section how it has coded. anyway ill look on to it. hope you can come up with a great solution as well

@africantearoa
Copy link
Contributor Author

africantearoa commented Jul 23, 2017 via email

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

2 participants