I have many android devices of different screen sizes. I want to make sure that whatever i write the script it should draw the same thing across all the android devices independent of the screen size. So for this I have one relative method as follows:-
public void dragRel(int relative) {
}
Where Rel = relative terms, here screen's width and height are both '1' and a location can be expressed by fractions of 1. And so the middle of the screen is always (0.5,0.5).
How do i write a function body that can get the screen size and drag on the screen relatively.
In general what you want to do is:
If you have these numbers, now your relative values are simply: