Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Last active March 1, 2023 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeforfun-jp/cc1a9ea9166952c5eeec447a52dd74f7 to your computer and use it in GitHub Desktop.
Save codeforfun-jp/cc1a9ea9166952c5eeec447a52dd74f7 to your computer and use it in GitHub Desktop.
Java Quiz - 2023 - 5
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
/* 省略 */
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
countLabel = findViewById(R.id.countLabel);
questionLabel = findViewById(R.id.questionLabel);
answerBtn1 = findViewById(R.id.answerBtn1);
answerBtn2 = findViewById(R.id.answerBtn2);
answerBtn3 = findViewById(R.id.answerBtn3);
answerBtn4 = findViewById(R.id.answerBtn4);
answerBtn1.setOnClickListener(this);
answerBtn2.setOnClickListener(this);
answerBtn3.setOnClickListener(this);
answerBtn4.setOnClickListener(this);
/* 省略 */
}
public void showNextQuiz() {
/* 省略 */
}
@Override
public void onClick(View view) {
/* ここに処理を書いていきます。 */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment