I am new to android programming and wanna know this:
I have 3 strings defined in the strings.xml file:
<resources>
<string name="one">First Click </string>
<string name="two">Second Click </string>
<string name="three">Third Click </string>
<resources>
and a text view which displays the first string in the strings.xml file.
i don't want to use settext("******")
to change the text of text view when the user
clicks on a button.
how can i make the textview switch to the text already defined in the strings.xml file, say from
First Click to Second Click
Use setText(getResources().getString(R.string.one));
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