How can I get the text from a pressed button? (Android)
I can get the text from a button:
String buttonText = button.getText();
I can get the id from a pressed button:
int buttinID = view.getId();
What I can't find out at this moment is how to get the text on the pressed button.
public void onClick(View view) {
// Get the text on the pressed button
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…