1.用于区分非常多类似的View 比如: button1.setOnClickListener(new OnClickListener ... ); button2.setOnClickListener(new OnClickListener ... ); 它们可能运行类似的逻辑,但你必须分别为两个Button设置两个独立的OnClick事件, public void onClick(View v) { doAction(1); // 1 for button1, 2 for button2,…