안드로이드 개발 질문/답변
(글 수 45,052)
특정 데이타의 횟수가 계속 쌓이도록 카운트를 달고 싶은데
소스를 어떻게 짜면 좋을까요?
@Override
public void OutputValue(int value){
int count;
if (value >=0)
{
count++;
}
int m_iCount;
if(m_iCount == 1){
m_iCount = 0;
tvValue.setText("개수= " +count);
} else {
String tmpStr = new String(tvValue.getText().toString()+"\n");
tmpStr += new String("개수= " +count);
tvValue.setText(tmpStr);
m_iCount++;
break;
}
}
int m_iCount; 라인의 위치가 의심스럽네요, 아마도 멤버 변수인듯한데 함수안으로 딸려온듯?ㅋ