i need to know, how to recognize, which button is pressed. Like if i have two buttons ,say button 1 and button2,and both of them performing the same method, say method(),how
I have 10 buttons performing the same method updateText(), I used this code to get the clicked button's text:
updateText()
public void updateText(View v){ Button btn = (Button) findViewById(v.getId()); String text = btn.getText().toString(); }