<Button android:id="@+id/button1" android:text="blah blah">
How do I get the text inside android:text
?
Button btn = (Button)findViewById(R.id.button1);
String buttontext = btn.getText().toString();
Hope this will help you.
you get text by.
Button button = (Button) findViewById(R.id.button1);
String yourText = (String)button.getText();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With