伊谢尔伦2017-04-17 17:40:21
Add the onClick="name" attribute to the component in the layout file.
The "name" can be arbitrary, as long as it corresponds to the class
Then in the class
public void name(View view) {
System.out.println("我被点击了!");
}
Write your click logic in this function