如题。我假设的场景是:
Activity中有30个button,我不打算一个一个的设置OnClickListener。如果可以获得所有的Button,就可以按照我的约定设置OnClickListener