The entered code (so you can copy and paste):
1.
public void buttonOnClick(View v) {
// do something when the button is clicked
}
2.
Button button=(Button) v;
3.
Then I typed v.settext and hit Tab to autocomplete the line ((Button) v).setText("clicked");
See supplemental information at http://www.i-programmer.info/programm...