I've read about interfaces in Java and now I want to make an interface which allows me to create the construction like below:
public class MyClass implements View.OnTouchListener {
//Implementation
public boolean onTouch(View arg0, MotionEvent arg1) {
/*SOME CODE*/
return true;
}
}
So I want to create similar interface (class). How can I invoke onTouch
method from OnTouchListener
interface if I don't know which class implements it? And how can I know which classes implements this interface if I decided to separate classes from interface (different libraries)? Hope you understand what I mean.
Thanks a lot!