kokoichi206 / rhythm_game

Android rhythm game
0 stars 0 forks source link

Make a button to stop playing #23

Closed kokoichi206 closed 2 years ago

kokoichi206 commented 2 years ago

Describe the solution you'd like Try this

findViewById(R.id.stopButton).setOnClickListener((view) -> {
    activity.finish();
});

Additional context

  1. Add a button
  2. Append a click function to the button
kokoichi206 commented 2 years ago

I chose canvas instead of xml file.

I don't understand how to coexist xml and canvas