android - OnTouchListener,the code jump and, method doesnt run -


I have a simple code, just do not understand why my method is math kordanadas imagine (motion event e ) Do not work

The listener first called that method

  View.OnTouchListener clickPinta = new View.OnTouchListener ( } {} @ Override Public Boolean On Touch (see V, Motion Event Event) {Log. ("Clickbint", "ontouch"); If (event.getAction () == MotionEvent.ACTION_UP) {Log.i ("ClickPint", "ACTION_UP"); // This log calculusCoordenadasImagen (event); // This method is not executed Log.i ("onToucn", "Pasa Callua Cord"); // This log works in Gardado Cordandas (Last Touch X, Last TouchView); Back true; }         return false; }};  

// This is a way that is not going and I can not understand why.

  Zero mathCondardadus Imagen (Motion event e) {log. ("CalculcaCoordenadas", ""); // This log does not work float [] M = new float [9]; Matrix.getValues ​​(m); Float transax = m [matrix. MTRANS_X] * -1; Float transwise = m [matrix. MRARNS_Y] * -1; Float scale x = m [matrix. MMSCile_X]; Float scaleY = m [Matrix.MSCALE_Y]; Last Touch X = (Int) ((E.T.TX) + Transx) / Scale X); Last Touching = (Int) ((EEGE) + Transization) / Scale-Y); Last Touch X = Math (Last Touch X); Previous Touch Y = Math }  

This is the method that has an error but because the previous method does not run:

  zero guardaCordenadas (int x, int y) {log I (" GuardaCoordenadas "," "); Marking = new mark (X, Y); ListaPtos.add (M); Log.i ("listaPtos0" "," + m.x + "-" + m.y); }  

And the first lines about Logkat error:

  10-28 09: 57: 45.683: I / Klikpinta (28066): On -Touch 10-28 09: 57: 45.688: I / Clickpinta (28066): On-Touch 10-28: 9: 57: 45.688: I / Click Paint (28066): ACTION_UP 10-28 09: 57: 45.688: I / Otukn (28066): Pasa calculcaCoord 10-28 09: 57: 45.688: e / input events Risevr (28066): input event dispatch exception 10-28 09: 57: 45.693: e / MessageQueue-JNI (28,066): handleReceiveCallback 10- 28 09 :: MessageQueue exception callback 57: 45.713: e / MessageQueue-JNI (28,066): java.lang.NullPointerException 10-28 09: 57: 45.713: e / Sndecyuyu-Jeanai (28066): com.andres.sun4all. Imagen.guardaCoorde On nadas (Imagine Java 9 9) 10-28 09: 57: 45.713: E / MessageQuality - JNI (28066): 57: 45.713: E / MessageQueue-JNI (28,066): android.view.View.dispatchTouchEvent at ( View.java:7332 com.andres.sun4all.Imagen $ 2.onTouch (Imagen.java:165) in 10-28 09) 10-28 09: 57: 45.713: E / MessageQueue-JANI (28066): Android. View.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java.00416) 10-28 09: 57: 45.713: E / Sndecyuyu - 10-28 09 on Jeanai (28066): android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2159): 57: 45.713: e / MessageQueue-JNI (28,066): android.view.ViewGroup.dispatchTransformedTouchEvent (on ViewGroup.java:2416)  

I think the problem is stupid, but fine , I can not find it

Thank you for your help and your time


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -