Here is a very simple snippets to use it. Just set the onMoveListener to retrieve its angle and strength.
onMoveListener
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ... JoystickView joystick = (JoystickView) findViewById(R.id.joystickView); joystick.setOnMoveListener(new JoystickView.OnMoveListener() { @Override public void onMove(int angle, int strength) { // do whatever you want } }); }
There was an error while loading. Please reload this page.