The text on my buttons are set in resource files. E.g.
<Button android:id="@+id/up_button" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="@string/up_label" />
The above code defines a button with text @string/up_label
. How can I change this text in my program during the application is running.
Thanks.
Button myButton = (Button) findViewById(R.id.up_button);
myButton.setText("my text");
maybe this will help.
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