-1
在这里,我有动画自定义的TextView之前删除的TextView:重新创建
badge7 = new BadgeView(this,findViewById(R.id.action_contact));
badge7.hide();
badge7.setTextColor(Color.BLUE);
badge7.setBadgeBackgroundColor(Color.YELLOW);
text++;
badge7.setText(String.valueOf(text));
badge7.setTextSize(12);
badge7.setBackgroundResource(R.drawable.badge_ifaux);
badge7.setBadgePosition(BadgeView.POSITION_TOP_LEFT);
badge7.setBadgeMargin(15, 10);
TranslateAnimation anim = new TranslateAnimation(-100, 0, 0, 0);
anim.setInterpolator(new BounceInterpolator());
anim.setDuration(2000);
anim.cancel();
badge7.toggle(anim, null);
的问题是每当动画会再次播放,我需要的最后一个从屏幕上消失,但我不能让它发生了什么,这样做的正确方法是什么?