나는 증가하는 동안 소리를 내고 단추의 배경색을 변경하는 루프가 있습니다. 사운드는 작동하지만 포터 듀프 모드를 사용하는 배경색은 루프가 완료 될 때까지 변경되지 않습니다. 카운터가 증가 할 때마다 각 버튼 색상을 변경하고 싶습니다.지연 색상 필터 세트
어떤 아이디어가 있습니까? 의 setColorFilter의 소리를 느리게하는
for (int i=1;i <= cupvalue; i++) {
if (soundvalue) { mSoundManager.playSound(1); }
buttons[i].getBackground().setColorFilter(0xFFff0000, PorterDuff.Mode.MULTIPLY); //red
beadcount--;
try {
Thread.sleep(delay); // delay sounds for each drop
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
은 "Thread.sleep를 (지연) 작동하지만 나던 업무 단지 루프의 끝에서 모든 버튼을 업데이트 : 여기 는 내 코드의 조각이다 thx