0
버튼 배열의 배경 이미지와 일치하는 그림 세트가 나타날 때 실제로 textView를 변경하고 싶습니다. 아래 코드 때문에 앱이 열리는 이유는 무엇인지 알 수 없습니다. 여기 코드입니다 :드로어 블 이미지가있는 버튼 이미지 비교 Android
protected void checkResult(int bx2[],int demon[]) {
// TODO Auto-generated method stub
final int[] cards1={R.drawable.one1,R.drawable.one2,
R.drawable.one3,R.drawable.two1,R.drawable.two2,
R.drawable.two3,R.drawable.three1,
R.drawable.three2,0};
int klop=0;
for(int i=0; i<9;i++) {
int sene = cards1[i];
Button vl = (Button) findViewById(bx2[i]);
if(vl.getBackground()==getResources().getDrawable(sene)) {
klop+=1;
if(klop==7) {
TextView tv = (TextView) findViewById(R.id.textView1);
tv.setText("PUZZLE SOLVED!");
}
}
}
}`
을 추가 할 수있는 충돌을 피하기 위해 때 드로어 블을 얻을 때
ResourceNotFoundException
와 충돌합니다 코드 다시 일어나기에서! 감사! – wisejoy