cassianotartari wrote:I find my stupid error. I think that was because of the many hours programming.
When I extends the
Dialog:
Using java Syntax Highlighting
private class Caixa extends Dialog {
public Caixa(Context context) {
super(context);
}
@Override
public boolean dispatchTouchEvent(MotionEvent event) { //<--- here is my Error !
fecharJanela();//dismiss the dialog and invalidate my overlay
return false;
}
}
Parsed in 0.035 seconds, using
GeSHi 1.0.8.4
It is possible to in the method dispatchTouchEvent know if the touch was in out side of the Dialog ? I'd like to close the Dialog when occurs this.
Thanks !
Hi cassiano,
I suppose "fechar janela" is "close window" , I'm spaniard and "fechar" is an old way to say "cerrar"
Ok, what do you want really? Why do you want to override dispatchTouchEvent? Do you want to close the Dialog if you touch the dialog or only by clicking a button?
As I know, you can use the pen over the screen on a button and it reacts normally but if you desire another behaviour, then you can override that methode of course, then the answer is yes, you can know whether a dialog was "touched" but I don't see the final reason very well but it's your programm

.
I can't help you anymore, I'm not familiar with the m5 or 0,9 (I develop my app under m3rc22a) apis of Dialog Class, I must see each time I develop something "blank" apis of all of classes in Eclipse, also, by clicking the .jar file and by navigating over directory tree
So sad is my story
cordiais saudações
Bavarol