86

I would like to know The difference between MotionEvent.getRawX and MotionEvent.getX in android as one is numeric and the other is float?Whats the need to have both of these types?

Laura Stone
  • 875
  • 1
  • 7
  • 8

1 Answers1

63

Picture for easy understanding

=>

rawX = motionEvent.getX() + touchableButton.getX() + layout3.getX() + layout2.getX();
tfad334
  • 558
  • 6
  • 14
Linh
  • 57,942
  • 23
  • 262
  • 279