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

Can't reach my photoEditorView.onClickListener while brush\eraser is active #287

Open
royraihen opened this issue Nov 11, 2020 · 0 comments

Comments

@royraihen
Copy link

royraihen commented Nov 11, 2020

I'm adding a crop\tilt activity to my program, and when I evoke the undo method, I wish that the undo will happen according to the sequence of events.

In order to do so, I'm trying to create an array which will add a 0 to it when the user have either used the text, brush and eraser.
problem is, that when the eraser or brush is active, I can't reach my photoEditorView.onClickListener

//NOT WORKING WHILE BRUSH IS ACTIVE
        imageView.setOnClickListener(view -> {
            if(brushIsActive){
                System.out.println("ABOUT TO ADD 0");
                undo_array[undo_it++] = 0;
                System.out.println("ADDED 0 TO UNDO ARRAY");
            }
        });

Basically all I need is something like this:

if (***brush stroke was made***){
    undo_array[undo_it++] = 0;
}

Any idea?

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