Button blue = (Button) findViewById(R.id.blueButton);
Button green = (Button) findViewById(R.id.greenButton);
Button red = (Button) findViewById(R.id.redButton);
Button alertBtn = (Button) findViewById(R.id.alertDialogButton);
Button progressBtn = (Button) findViewById(R.id.progressDialogButton);
//设置触发事件
View
用switch添加多个button的onclicklistener
最新推荐文章于 2021-03-25 19:16:48 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)