I'm writing a program that has two classes, one that extends Activity and another that extends SurfaceView. The activity has an object of the SurfaceView class. I am trying to use setters and getters to send data between these two classes, but every time I try, eclipse says that the methods for setting and getting need to be static. I can't do this because I don't want them to be static.
The Activity class contains the following methods:
public float getxTouch(){
return xTouch;
}
public float getyTouch(){
return yTouch;
}
The SufaceView class contains the following code:
xpos = ActivityClass.getxTouch();
ypos = ActivityClass.getyTouch();
How might I fix this without making the methods static?