Android click button populate textview
<p>This is week one of Android for me! </p>

<p>I'm programmatically creating a textview, two labels and a button in the same activity. 
The idea is that the textview receives a string from the user. 
The user clicks the button and the textview string is passed to a proc which returns a string result, and the string result is assigned to one of the labels.</p>

<pre><code>public void onClick(View view) {
     sresults = showPP(ttsymbol.getText().toString().trim());
}
</code></pre>

<p>But this doesn't work, because "the final local variable sresults cannot be assigned, since it is defined in an enclosing type"</p>

<p>I think I understand what is going wrong, but is there an alternative way of returning 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?</p>

<p>Thanks!</p>
