private Handler handdler1 = new Handler(){
public void handleMessage(Message msg) {
super.handleMessage(msg);
handler1.removeCallbacks(mythread);
.................중략
int sound = 0;
str1Text.setText("");
str2Text.setText("");
try{
if( ...){
String str1 = new String(aaaa1, bbb);
str1Text.setText(str1);
sound++;
}
if(...){
String str2 = new String(aaaa2, bbb);
str2Text.setText(str2);
sound++;
}
success(sound);
}
catch(UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
핸들메세지를 위와 같이 받아와서
str1Text, str2Text
에 넣는 메소드인데요
성공하면 success 함수에서 성공한 만큼 sound++ 을 받아서 소리를 내 줍니다
처음에 들어오면 0으로 초기화를 해주구요
그런데 소리는 나지만 가끔 UI가 올라오지 않는 경우가 있어 디버깅을 해봤는데
str1 str2 변수에는 값이 제대로 들어오는데
UI에는 표시가 되질 않네요
이유를 아시는분 있나요?