Results 1 to 1 of 1
- 01-29-2012, 02:21 PM #1
Senior Member
- Join Date
- Aug 2009
- Posts
- 294
- Rep Power
- 0
SurfaceView onTouchEvent's action is always 0.
Hi!
Im trying to make my game react so that you can drag a character using your finger.
Ofcourse this is a very hard task for an anroid, so instead of managing to give me the action using getAction() it returns a "masked" value.
To unmask this value one is suppose to do event.getAction()&MotionEvent.ACTION_MASK
Ofcourse this does not work either!
So I tried to log every possible input that the method recives:
Will output:Log.d(TAG, "Actual Action: "+(event.getAction()&MotionEvent.ACTION_MASK)) ;
Log.d(TAG, "Action: "+event.getAction());
Log.d(TAG, "Index: "+event.getActionIndex());
Log.d(TAG,"Mask" + event.getActionMasked());
Nomather where I drag nor howlong I drag.Actual Action: 0
Action: 0
Index: 0
Mask0
CONCLUSION: ANDROID does not listen to MY drag events.
So I found this method called: onDragEvent
It never fires AT ALL.
I truely hate the incompetent creators of android and I wish them all the worst.
BUT I must do a game in android so I would appreciate if someone has bypassed this problem in any tricky way?
Similar Threads
-
HTTP Status 404 - There is no Action mapped for namespace / and action name
By kurakukiran in forum Web FrameworksReplies: 1Last Post: 06-30-2011, 09:49 AM -
Format of box changes after first action
By tnixon22 in forum New To JavaReplies: 3Last Post: 02-21-2011, 03:09 AM -
HTTP Status 404 - There is no Action mapped for action name showmainframe...
By vaibhavspawar in forum Advanced JavaReplies: 3Last Post: 08-19-2010, 08:27 AM -
Action Listener
By greatmajestics in forum AWT / SwingReplies: 8Last Post: 03-25-2010, 05:39 PM -
JButton action
By jperson in forum New To JavaReplies: 3Last Post: 03-24-2010, 06:47 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks