Button btn = ui.btnValider; btn.setOnClickListener( new View.OnClickListener() { public void onClick(View btn) { // faire quelque chose } });