A 라는 버튼을 터치했을때 B라는 버튼의 상태에 따라 B버튼에 애니메이션을 적용시키고 싶습니다.
Button 객체에 이벤트를 강제로 호출할 수 있는 메서드가 있나요??
현재 코딩중 문제는 A라는 버튼을 눌렀을 시에만 B버튼의 상태를 확인해야하는데 B버튼을 누르면 A버튼이 눌러진것으로 인식하여 애니메이션이 작동 되고 있습니다.
조언부탁드리겠습니다.
final Animation anim = AnimationUtils.loadAnimation(this, R.anim.animation);
Button nullCheckBtn = (Button)findViewById(btnName);
nullCheckBtn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v2) {
v2.startAnimation(anim);
}
});
nullCheckBtn.performClick();