TextView setText appends instead
<p>Hi im trying to set the value of a textview with .setText in a method that is run by a thread but it is being appended to the TextView instead. The parameter String f is a being send to the method in a for loop like this:</p>

<pre><code>    for (int j = 0; j &lt; 5; j++) {
        String[] string = array[j].split(":");
        String y= string[0];
        String x= string[1];
        determineSeat(y, something, x);
    }
}

private void determineSeat(String is, String cs, String f)
{
            TextView txtHand = null;
    String txt = null;

    if (iSeat &lt; cSeat) {
        x = cSeat - iSeat;

        if (x == 1) {
            txtHand = (TextView) findViewById(R.id.txtHand8);
            txt = txtHand.getText().toString();
            txtHand.setText("");
            txtHand.setText(txt + ":"  + f);
        }
}
</code></pre>

<p>XML:</p>

<pre><code>&lt;TextView
    android:id="@+id/txtHand1"
    android:layout_width="73dp"
    android:layout_height="wrap_content"
    android:layout_above="@+id/textView1"
    android:layout_centerHorizontal="true"
    android:text=" " /&gt;
</code></pre>

<p>I want it to be cleared everytime i put something in the textview instead of being appended anyone knows what the problem is?</p>
