java类android.view.animation.OvershootInterpolator的实例源码

PlaylistFragment.java 文件源码 项目:Melophile 阅读 41 收藏 0 点赞 0 评论 0
@Override
public void showTitle(String title) {
    playlistTitle.setText(title);
    playlistTitle.setScaleX(0);playlistTitle.setScaleY(0);
    titleBackground.post(()->{
        int cx=titleBackground.getWidth()/2;
        int cy=titleBackground.getHeight()/2;
        Animator animator=ViewAnimationUtils.createCircularReveal(titleBackground,cx,cy,0,
                (int)Math.hypot(titleBackground.getWidth(),titleBackground.getHeight()));
        animator.setDuration(400);
        animator.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationStart(Animator animation) {
                super.onAnimationStart(animation);
                titleBackground.setVisibility(View.VISIBLE);
                playlistTitle.animate()
                        .setDuration(400)
                        .scaleX(1).scaleY(1)
                        .setInterpolator(new OvershootInterpolator())
                        .start();
            }
        });
        animator.start();
    });
}
VideoDetailsActivity.java 文件源码 项目:HeroVideo-master 阅读 35 收藏 0 点赞 0 评论 0
private void showFAB() {

        mFAB.animate().scaleX(1f).scaleY(1f)
                .setInterpolator(new OvershootInterpolator())
                .start();

        mFAB.setClickable(true);
    }
PoemAdapter.java 文件源码 项目:NotifyTools 阅读 25 收藏 0 点赞 0 评论 0
public PoemViewHolder(View view) {
  super(view);
  tv=(TextView) view.findViewById(R.id.item_tv);
  expandableLayout = (ExpandableLayout) itemView.findViewById(R.id.expandable_layout);
  expandText=(TextView)itemView.findViewById(R.id.expandable_text);
  expandableLayout.setInterpolator(new OvershootInterpolator());
  expandableLayout.setOnExpansionUpdateListener(this);

  tv.setOnClickListener(this);
}
MainActivity.java 文件源码 项目:FirebasePost 阅读 32 收藏 0 点赞 0 评论 0
private void startContentAnimation() {
    fabCreate.animate()
            .translationY(0)
            .setInterpolator(new OvershootInterpolator(1.f))
            .setStartDelay(300)
            .setDuration(ANIM_DURATION_FAB)
            .start();
    feedAdapter.updateItems(true);
}
OvershootInRightAnimator.java 文件源码 项目:GitHub 阅读 25 收藏 0 点赞 0 评论 0
@Override
protected void animateAddImpl(final RecyclerView.ViewHolder holder, final int index) {
    ViewCompat.animate(holder.itemView)
            .translationX(0)
            .setDuration(getAddDuration())
            .setInterpolator(new OvershootInterpolator(mTension))
            .setListener(new DefaultAddVpaListener(holder))
            .start();
}
OvershootInLeftAnimator.java 文件源码 项目:GitHub 阅读 34 收藏 0 点赞 0 评论 0
@Override
protected void animateAddImpl(final RecyclerView.ViewHolder holder, final int index) {
    ViewCompat.animate(holder.itemView)
            .translationX(0)
            .setDuration(getAddDuration())
            .setListener(new DefaultAddVpaListener(holder))
            .setInterpolator(new OvershootInterpolator(mTension))
            .start();
}
SlideFromTopPopup.java 文件源码 项目:GitHub 阅读 102 收藏 0 点赞 0 评论 0
@Override
protected Animation initShowAnimation() {
    TranslateAnimation translateAnimation = new TranslateAnimation(0f, 0f, -DimensUtils.dipToPx(getContext(), 350f), 0);
    translateAnimation.setDuration(450);
    translateAnimation.setInterpolator(new OvershootInterpolator(1));
    return translateAnimation;
}
SlideFromTopPopup.java 文件源码 项目:GitHub 阅读 27 收藏 0 点赞 0 评论 0
@Override
protected Animation initExitAnimation() {
    TranslateAnimation translateAnimation = new TranslateAnimation(0f, 0f, 0, -DimensUtils.dipToPx(getContext(), 350f));
    translateAnimation.setDuration(450);
    translateAnimation.setInterpolator(new OvershootInterpolator(-4));
    return translateAnimation;
}
MailsFragment.java 文件源码 项目:GitHub 阅读 36 收藏 0 点赞 0 评论 0
@Override public void showContent() {
  super.showContent();
  if (createMailButton.getVisibility() != View.VISIBLE) {
    createMailButton.setVisibility(View.VISIBLE);

    if (!isRestoringViewState()) {
      PropertyValuesHolder holderX = PropertyValuesHolder.ofFloat("scaleX", 0, 1);
      PropertyValuesHolder holderY = PropertyValuesHolder.ofFloat("scaleY", 0, 1);
      ObjectAnimator animator =
          ObjectAnimator.ofPropertyValuesHolder(createMailButton, holderX, holderY);
      animator.setInterpolator(new OvershootInterpolator());
      animator.start();
    }
  }
}
Launcher.java 文件源码 项目:LaunchEnr 阅读 34 收藏 0 点赞 0 评论 0
private ValueAnimator createNewAppBounceAnimation(View v, int i) {
    ValueAnimator bounceAnim = LauncherAnimUtils.ofViewAlphaAndScale(v, 1, 1, 1);
    bounceAnim.setDuration(InstallShortcutReceiver.NEW_SHORTCUT_BOUNCE_DURATION);
    bounceAnim.setStartDelay(i * InstallShortcutReceiver.NEW_SHORTCUT_STAGGER_DELAY);
    bounceAnim.setInterpolator(new OvershootInterpolator(BOUNCE_ANIMATION_TENSION));
    return bounceAnim;
}


问题


面经


文章

微信
公众号

扫码关注公众号