michaelye / EasyDialog

A lightweight, flexible tip dialog in Android
Other
705 stars 191 forks source link

OnTouchListener should be removable #10

Closed mp3por closed 8 years ago

mp3por commented 8 years ago

Hey,

Another issue I ran into is that you put an OnTouchListener on the "rlOutsideBackground" in order to handle touch events for the "touch-outside-to-dismiss" functionality. This is very nice however you should remove the listener when "setTouchOutsideDismiss(false)" is called rather then just not handling the event. Since the "rlOutsideBackground" is match_parent,match_parent, registering an onTouchLIstener will catch all touches on the screen and will not propagate even if the "setTouchOutsideDismiss" is false ... which means in the end that I can not have a tooltip and interact with anything else on the screen at the same time...

please fix

michaelye commented 8 years ago

@mp3por Yeah,you are right.Thanks for the issue,I will fix it soon.

mp3por commented 8 years ago

Just to let you know that when removing the OnTouchListener you have to make sure that the touch events are correctly propagated to the background view. Only removing the OnTouchListener will not fix the problem because the "dialog" is not a child of the root view on the screen. Cheers.

I hope you fix it ASAP cause I really need it

michaelye commented 8 years ago

@mp3por So sorry about that,I am busy recently.Ok, tomorrow is Friday in China, so I plan to fix it this weekend,okay?After I fixed it,I will let you know.

Merry Christmas!

mp3por commented 8 years ago

Thank you :) Merry Christmas to you as well.

michaelye commented 8 years ago

@mp3por fixed this issue

see

compile 'com.github.michaelye.easydialog:easydialog:1.2'

pompobit commented 8 years ago

@mp3por did you find a solution for this? I'm using 1.4 but I still cannot click anything else than the dialog until it is not dismissed. The same issue occurs with both setTouchOutsideDismiss(true) and setTouchOutsideDismiss(false)