animationlistener 内で変数を使用するにはどうすればよいですか
元。
for(int i = 0; i<ids.length; i++) {
//Doing some animation stuff based on
//imageView = (ImageView) findViewById(ids[i]);
//I want to play a sound on the specific views animationstart
scalePause.addListener(new AnimatorListenerAdapter() {
public void onAnimationStart(Animator animation) {
sounds.play(letterSounds[i], 1.0f, 1.0f, 0, 0, 1.0f);
}
}); }
Eclipse エラー: 別のメソッドで定義された内部クラス内の非最終変数を参照できません
(iを参照)