In java, after creating a button this way:
Button button1= new Button();
i can identify the reference of a button this way
public void actionPerformed(ActionEvent bottonName){
Button name_of_the_button= (Button)bottonName.getSource();
//Inside 'name_of_the_button' I have 'button1'
}
How can i do the same on android? I tried this way
public void onClick(View bottonName) {
Button name_of_the_button= (Button )bottonName.getSource();
}
But on android there isn’t the method getSource().
then