안녕하세요 메신저 스레드에 의해 실행되는 메서드에서 .setText 사용하여 textview 값을 설정하려고하지만 대신 TextView에 추가됩니다. 매개 변수 문자열 F는 존재가이 같은 for 루프의 방법으로 전송할 수 있습니다 :TextView setText가 대신 추가됩니다
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=" " />
내가 내가되는 대신 텍스트 뷰에 뭔가를 넣어 그것을 매번 삭제하려면 아무도 그 문제가 뭔지 아는가?
Yosem이 게시 된 후 글쓰기가 시작되었습니다. 그래서 나는 그의 지위를 보지 못했다. 기본적으로, 그는 말했습니다. – gmaster
내 의견으로는, 당신의 대답은 훨씬 더 명확하고 문제를 해결하는 방법을 더 잘 설명합니다. 내 표를 얻었 어. –
Thx, 대답은 사실 내가 지금 txt 문자열로 무엇을 하려는지 잊어 버렸습니다. 너무 오랫동안 바빠서 내가 더 이상 잘못하고있는 것이 미안하다는 것을 알지 못했습니다. 이 주제는 답변되었습니다. – Vern