New answers tagged


Create a callback interface that the JoystickView fires when it sees an event, then make the GameView implement that interface and register itself as a listener to the JoystickView. A simple approach could look something like this; public interface JoystickListener { boolean onJoystickEvent(MotionEvent e); } public class JoystickView extends View { ...

Top 50 recent answers are included