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

GroupLayer.addListener not working? #32

Closed
ghost opened this issue May 22, 2014 · 2 comments
Closed

GroupLayer.addListener not working? #32

ghost opened this issue May 22, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented May 22, 2014

I'm trying to show some image layers in a group when this group is clicked:

    groupLayer.addListener(new Pointer.Adapter() {

        @Override
        public void onPointerStart(Pointer.Event event) {
            //set some child layer as visible
        }
    });

The onPointerStart callback is called only if setPropagateEvents is set to true and if a child is clicked.

@jamie-threerings
Copy link
Contributor

Did you call setHitTester? Some code will need to decide whether or not the pointer is inside a group, since its bounds are not automatically defined. For example, if it just has "return layer", then the group will consume all clicks and they'll never reach the children or later siblings. Have a look at tripleplay for some examples.

@ghost
Copy link
Author

ghost commented May 22, 2014

@ghost ghost closed this as completed May 22, 2014
This issue was closed.
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

1 participant