Chinaunix首页 | 论坛 | 博客
  • 博客访问: 17555
  • 博文数量: 22
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 300
  • 用 户 组: 普通用户
  • 注册时间: 2015-10-07 10:58
个人简介

android开发

文章分类

全部博文(22)

文章存档

2015年(22)

我的朋友

分类: Android平台

2015-12-03 11:34:35

,空软键盘输入每一个文字的时候优美的展现在edit效果,
本项目主要是自定义BiuEditText实现。
项目来自:
本项目主要由如下动画实现:
 final AnimatorSet animSet = new AnimatorSet();
        ObjectAnimator animX = ObjectAnimator.ofFloat(textView, "translationX", startX, endX);
        ObjectAnimator animY = ObjectAnimator.ofFloat(textView, "translationY", startY, endY);
        ObjectAnimator scaleX = ObjectAnimator.ofFloat(textView, "scaleX", 0.6f, 1.2f);
        ObjectAnimator scaleY = ObjectAnimator.ofFloat(textView, "scaleY", 0.6f, 1.2f);

        animY.setInterpolator(new DecelerateInterpolator());
        animSet.setDuration(600);
        animSet.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationStart(Animator animation) {
            }

            @Override
            public void onAnimationEnd(Animator animation) {
                contentContainer.removeView(textView);
            }
        });
        animSet.playTogether(animX, animY, scaleX, scaleY);
        animSet.start();

运行效果:


源码下载:

相关代码

阅读(309) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~