Results 1 to 1 of 1
- 01-29-2012, 02:21 PM #1Senior Member
- Join Date
- Aug 2009
- Rep Power
SurfaceView onTouchEvent's action is always 0.
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:
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());
Actual Action: 0
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?
- By kurakukiran in forum Web FrameworksReplies: 1Last Post: 06-30-2011, 09:49 AM
- By tnixon22 in forum New To JavaReplies: 3Last Post: 02-21-2011, 03:09 AM
- By vaibhavspawar in forum Advanced JavaReplies: 3Last Post: 08-19-2010, 08:27 AM
- By greatmajestics in forum AWT / SwingReplies: 8Last Post: 03-25-2010, 05:39 PM
- By jperson in forum New To JavaReplies: 3Last Post: 03-24-2010, 06:47 PM