Reputation: 651
I'm developing the drawing type of application in that particular activity i want to disable the touch events and i want to enable only the stylus event. Is there any default API in android to differentiate between two events ?
Upvotes: 4
Views: 1600
Reputation: 1627
To distinguish whether a MotionEvent is derived from a human thumb or a TPT’s pen, Volker polls MotionEvent.getTouchMajor(). If a fatty finger touches the screen, the diameter of the ellipse will be > 0. If it’s an anorexic digitizer pen, it will be 0.0f.
Upvotes: 7