Android click button populate textview -
This is Android's week for me!
I am making the program a text view, two labels and a button in the same activity. The idea is that the text view receives a string from the user. The user clicks the button and the textive string is passed to a proc that returns string results, and the string result is assigned to one of the labels.
Click Public Zero (see view) {Sresults = showPP (ttsymbol.getText (). ToString (.) Trim ()); } But this does not work, because "the last local variable can not be indexed because it is defined in an enclosed type"
I think Is that what I think is going wrong, but is an alternate way to return the results so that they can be displayed in the label? Or is it necessary to create a new dialog inside the onClick function to show them?
Thank you!
If you definitely change values, then there is no point in making it last. Used for last constant values.
You should set a price directly in the label view. Label view references can be final. Click Public Zero (see view) {labels.set text (ttsymbol.getText () .toString (.) Trim ()); }
Comments
Post a Comment