嗨,我有一个动画,我想用一个可运行的东西来延迟开始,但是它导致动画循环我不需要我只是想让它延迟然后运行一次有人知道怎么做吗?
这是我的代码
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layout_initialsetup);
handler = new Handler();
final Runnable r = new Runnable()
{
public void run()
{
animations();
handler.postDelayed(this, 1000);
}
};
handler.postDelayed(r, 1000);
}
public void animations(){
image = (ImageView)findViewById(R.id.su_shirts);
AnimationMovepos = AnimationUtils.loadAnimation(this, R.anim.shirt_anim);
image.startAnimation(AnimationMovepos);
}
}