```
public class MainActivity extends Activity implements OnClickListener {
...
...
btn.setOnClickListener(this);
...
@Override
void onClick(View view){
    switch(view.getId()) {

}
}