Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- animToast = AnimationUtils.loadAnimation(context, R.anim.toast);
- animToast.setAnimationListener(new Animation.AnimationListener() {
- @Override
- public void onAnimationStart(Animation p1) {
- }
- @Override
- public void onAnimationEnd(Animation p1) {
- toastText.setVisibility(View.GONE);
- }
- @Override
- public void onAnimationRepeat(Animation p1) {
- }
- });
- ---Сама анимация
- toastText.setTextColor(unit.getColor());
- toastText.setVisibility(View.VISIBLE);
- toastText.setX(e.getX() - toastText.getWidth() / 2);
- toastText.setY(e.getY());
- toastText.startAnimation(animToast);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement