Skip to content

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

@royraihen

Description

@royraihen

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions