How can I get the text from a pressed button? (Android)
I can get the text from a button:
String buttonText = button.getText();
I c
If you're sure that the OnClickListener instance is applied to a Button, then you could just cast the received view to a Button and get the text:
public void onClick(View view){ Button b = (Button)view; String text = b.getText().toString(); }