I'm implementing an OnTouchListener
on a custom view. In this view I'm drawing an object that basically moves along x and y axis I get form event.getX();
and event.getY();
respectively.
I want to perform some draw
changes when touch events happen at particular positions in screen. The problem is, the values are different for different screen sizes. For example value of X value of a point on a WVGA device is 60 and on tablets it is 100. Since this is inconsistent i couldn't write a proper if
condition.
Please can any one suggest a solution for this from your prior experience?