I have one simple problem with updating TextView.
Here is example of my sample code.
class MyClass extends Activity{
..
..
TextView tv = (TextView)findViewById(R.id.body);
confirmButton.setOnClickListener(new OnClickListener() {
public void onClick(View v){
tv.setText("Example Text\n");
tv.append("Example Text2\n");
}
}
}
Above is just example code (I didn't copy and paste my code) and I
implement similar with above.
And my expeted result is
When click the button multiple times.
-----------------------
Example Text
Example Text2
-----------------------
But actual result is
-----------------------
Example Text
Example Text2
Example Text
Example Text2
Example Text
Example Text2
...
-----------------------
That textview append the result.
How can I clear the view and re draw the text on the textview??
Need help.
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en