こんにちは、スレッドによって実行されるメソッドで .setText を使用して textview の値を設定しようとしていますが、代わりに TextView に追加されています。パラメータ文字列 f は、次のように for ループでメソッドに送信されます。
for (int j = 0; j < 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 < cSeat) {
x = cSeat - iSeat;
if (x == 1) {
txtHand = (TextView) findViewById(R.id.txtHand8);
txt = txtHand.getText().toString();
txtHand.setText("");
txtHand.setText(txt + ":" + f);
}
}
XML:
<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=" " />
追加するのではなく、テキストビューに何かを入れるたびにクリアしたいのですが、何が問題なのか知っている人はいますか?