From that I\'ve read you can assign a onClick handler to a button in two ways.
onClick
Using the android:onClick XML attribute where you just use t
android:onClick
The best way to do this is with the following code:
Button button = (Button)findViewById(R.id.btn_register); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //do your fancy method } });