Click here to Skip to main content
15,884,751 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In a custom view how would it be possible to get how much of a finger touched the screen. In other words, to get if the user used the tip of his finger or a larger area. And then to be able to get each dimension of the rectangle.
Posted

1 solution

Java
event.getPointerCount()
method call gives you number of touch

Sample Code:

Java
@Override
public boolean onTouchEvent(final MotionEvent event)
{
    System.out.println("Touch Count ="+event.getPointerCount());

    return true;
}
 
Share this answer
 
Comments
Matias234 20-Dec-11 15:24pm    
not really what i'm looking for. I'm looking for code that can give you basically a rectangle that represents the area that was touched.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900