0
我对Android应用程序开发非常新颖,所以会问一个非常基本的问题。 setOnClickListener()
的工作是什么?使用setOnClickListener()
在下面的代码:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_sudoku);
View continueButton = findViewById(R.id.continue_button);
continueButton.setOnClickListener(this);
View newButton = findViewById(R.id.new_button);
newButton.setOnClickListener(this);
View aboutButton = findViewById(R.id.about_button);
aboutButton.setOnClickListener(this);
View exitButton = findViewById(R.id.exit_button);
exitButton.setOnClickListener(this);
}`
什么是aboutButton.setOnClickListener(this)
功能?