burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.13k stars 991 forks source link

Change the logic of updateView() to be called in onClick() #388

Closed jsericksk closed 3 years ago

jsericksk commented 3 years ago

It seems to me that it makes more sense to call updateView() which triggers onEditTextChangeListener() in onClick() and not onLongClick(), as it is more expected to edit the text right after clicking on it rather than a long click. Are there any special reasons not to do this?

burhanrashid52 commented 3 years ago

Nothing special. Just a more convenient UX. I am not sure but the click might cause with dragging the text view.

jsericksk commented 3 years ago

I can't remember any photo editor app that does this in one long click.

But, in fact, this behavior would not be very ideal for the current structure of the library, as it would make it impossible for the drag and drop event before tapping once to edit, as the text would first need to be selected to get the drag event correctly.

In a more intrusive editing UI, like a dialog, this doesn't really look good, but since I was testing it in an EditText on the editing screen itself, it didn't seem like a bad idea to me.

In this case there should be a better function to identify onClick() events and drag and drop events.

Anyway, thanks for answering.