java类android.support.v4.view.animation.FastOutSlowInInterpolator的实例源码

QuickAttachmentDrawer.java 文件源码 项目:PeSanKita-android 阅读 28 收藏 0 点赞 0 评论 0
private void slideTo(int slideOffset, boolean forceInstant) {
  if (animator != null) {
    animator.cancel();
    animator = null;
  }

  if (!forceInstant) {
    animator = ObjectAnimator.ofInt(this, "slideOffset", this.slideOffset, slideOffset);
    animator.setInterpolator(new FastOutSlowInInterpolator());
    animator.setDuration(400);
    animator.start();
    ViewCompat.postInvalidateOnAnimation(this);
  } else {
    this.slideOffset = slideOffset;
    requestLayout();
    invalidate();
  }
}
ViewPagerFragment.java 文件源码 项目:Auto.js 阅读 25 收藏 0 点赞 0 评论 0
@CallSuper
public void onPageShow() {
    mShown = true;
    if (mFabRotation == ROTATION_GONE) {
        if (mFab.getVisibility() == View.VISIBLE) {
            mFab.hide();
        }
        mFab.setOnClickListener(null);
        return;
    }
    mFab.setOnClickListener(mOnFabClickListener);
    if (mFab.getVisibility() != View.VISIBLE) {
        mFab.setRotation(mFabRotation);
        mFab.show();
    } else if (Math.abs(mFab.getRotation() - mFabRotation) > 0.1f) {
        mFab.animate()
                .rotation(mFabRotation)
                .setDuration(300)
                .setInterpolator(new FastOutSlowInInterpolator())
                .start();
    }
}
MainActivity.java 文件源码 项目:Slide-RSS 阅读 25 收藏 0 点赞 0 评论 0
private ValueAnimator slideAnimator(int start, int end, final View v) {

        ValueAnimator animator = ValueAnimator.ofInt(start, end);

        animator.setInterpolator(new FastOutSlowInInterpolator());

        animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator valueAnimator) {
                //Update Height
                int value = (Integer) valueAnimator.getAnimatedValue();
                ViewGroup.LayoutParams layoutParams = v.getLayoutParams();
                layoutParams.height = value;
                v.setLayoutParams(layoutParams);
            }
        });
        return animator;
    }
CreateCardView.java 文件源码 项目:Slide-RSS 阅读 22 收藏 0 点赞 0 评论 0
private static ValueAnimator slideAnimator(int start, int end, final View v) {
    ValueAnimator animator = ValueAnimator.ofInt(start, end);
    animator.setInterpolator(new FastOutSlowInInterpolator());

    animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(ValueAnimator valueAnimator) {
            //Update Height
            int value = (Integer) valueAnimator.getAnimatedValue();
            ViewGroup.LayoutParams layoutParams = v.getLayoutParams();
            layoutParams.height = value;
            v.setLayoutParams(layoutParams);
        }
    });
    return animator;
}
CreateCardView.java 文件源码 项目:Slide-RSS 阅读 23 收藏 0 点赞 0 评论 0
private static ValueAnimator flipAnimator(boolean isFlipped, final View v) {
    if (v != null) {
        ValueAnimator animator = ValueAnimator.ofFloat(isFlipped ? -1f : 1f, isFlipped ? 1f : -1f);
        animator.setInterpolator(new FastOutSlowInInterpolator());

        animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator valueAnimator) {
                //Update Height
                v.setScaleY((Float) valueAnimator.getAnimatedValue());
            }
        });
        return animator;
    }
    return null;
}
QuickAttachmentDrawer.java 文件源码 项目:Cable-Android 阅读 28 收藏 0 点赞 0 评论 0
private void slideTo(int slideOffset, boolean forceInstant) {
  if (animator != null) {
    animator.cancel();
    animator = null;
  }

  if (!forceInstant) {
    animator = ObjectAnimator.ofInt(this, "slideOffset", this.slideOffset, slideOffset);
    animator.setInterpolator(new FastOutSlowInInterpolator());
    animator.setDuration(400);
    animator.start();
    ViewCompat.postInvalidateOnAnimation(this);
  } else {
    this.slideOffset = slideOffset;
    requestLayout();
    invalidate();
  }
}
AddressSelector.java 文件源码 项目:ZRAddressSelector 阅读 21 收藏 0 点赞 0 评论 0
private AnimatorSet buildIndicatorAnimatorTowards(TextView tab) {
    ObjectAnimator xAnimator = ObjectAnimator.ofFloat(indicator, "X", indicator.getX(), tab.getX());

    final ViewGroup.LayoutParams params = indicator.getLayoutParams();
    ValueAnimator widthAnimator = ValueAnimator.ofInt(params.width, tab.getMeasuredWidth());
    widthAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            params.width = (int) animation.getAnimatedValue();
            indicator.setLayoutParams(params);
        }
    });

    AnimatorSet set = new AnimatorSet();
    set.setInterpolator(new FastOutSlowInInterpolator());
    set.playTogether(xAnimator, widthAnimator);

    return set;
}
MaterialAboutActivity.java 文件源码 项目:material-about-library 阅读 20 收藏 0 点赞 0 评论 0
private void onTaskFinished(@Nullable MaterialAboutList materialAboutList) {
    if (materialAboutList != null) {
        list = materialAboutList;
        adapter.swapData(list);

        if (shouldAnimate()) {
            recyclerView.animate()
                    .alpha(1f)
                    .translationY(0f)
                    .setDuration(400)
                    .setInterpolator(new FastOutSlowInInterpolator()).start();
        } else {
            recyclerView.setAlpha(1f);
            recyclerView.setTranslationY(0f);
        }
    } else {
        finish();//?? why we remain here anyway?
    }
}
MaterialAboutFragment.java 文件源码 项目:material-about-library 阅读 23 收藏 0 点赞 0 评论 0
@Override
protected void onPostExecute(String s) {
    adapter.swapData(list);

    if (shouldAnimate()) {
        recyclerView.animate()
                .alpha(1f)
                .translationY(0f)
                .setDuration(400)
                .setInterpolator(new FastOutSlowInInterpolator())
                .start();
    } else {
        recyclerView.setAlpha(1f);
        recyclerView.setTranslationY(0f);
    }

    super.onPostExecute(s);
    fragmentContext = null;
}
AddressSelector.java 文件源码 项目:JDAddressSelector 阅读 23 收藏 0 点赞 0 评论 0
private AnimatorSet buildIndicatorAnimatorTowards(TextView tab) {
    ObjectAnimator xAnimator = ObjectAnimator.ofFloat(indicator, "X", indicator.getX(), tab.getX());

    final ViewGroup.LayoutParams params = indicator.getLayoutParams();
    ValueAnimator widthAnimator = ValueAnimator.ofInt(params.width, tab.getMeasuredWidth());
    widthAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            params.width = (int) animation.getAnimatedValue();
            indicator.setLayoutParams(params);
        }
    });

    AnimatorSet set = new AnimatorSet();
    set.setInterpolator(new FastOutSlowInInterpolator());
    set.playTogether(xAnimator, widthAnimator);

    return set;
}
FloatingView.java 文件源码 项目:velociraptor 阅读 23 收藏 0 点赞 0 评论 0
public FloatingOnTouchListener() {
    final WindowManager.LayoutParams params = (WindowManager.LayoutParams) mFloatingView.getLayoutParams();
    fadeOut = ValueAnimator.ofFloat(params.alpha, 0.1F);
    fadeOut.setInterpolator(new FastOutSlowInInterpolator());
    fadeOut.setDuration(100);
    fadeOut.addUpdateListener(valueAnimator -> {
        params.alpha = (float) valueAnimator.getAnimatedValue();
        try {
            mWindowManager.updateViewLayout(mFloatingView, params);
        } catch (IllegalArgumentException ignore) {
        }
    });
    fadeIn = fadeOut.clone();
    fadeIn.setFloatValues(0.1F, params.alpha);
    fadeIn.setStartDelay(5000);
}
ChatActivity.java 文件源码 项目:talk-android 阅读 37 收藏 0 点赞 0 评论 0
public void resetStory() {
    getSupportActionBar().setTitle(story.getTitle());
    overlay.setClickable(false);
    overlay.animate()
            .alpha(0.0F)
            .setDuration(200L)
            .setInterpolator(new FastOutSlowInInterpolator())
            .start();
    switch (StoryDataProcess.Category.getEnum(story.getCategory())) {
        case FILE:
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.container, FileStoryFragment.getInstance(story, false))
                    .commit();
            break;
        case TOPIC:
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.container, TopicStoryFragment.getInstance(story, false))
                    .commit();
            break;
        case LINK:
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.container, LinkStoryFragment.getInstance(story, false))
                    .commit();
            break;
    }
}
SegmentedButtonGroup.java 文件源码 项目:SegmentedButton 阅读 29 收藏 0 点赞 0 评论 0
private void initInterpolations() {
    ArrayList<Class> interpolatorList = new ArrayList<Class>() {{
        add(FastOutSlowInInterpolator.class);
        add(BounceInterpolator.class);
        add(LinearInterpolator.class);
        add(DecelerateInterpolator.class);
        add(CycleInterpolator.class);
        add(AnticipateInterpolator.class);
        add(AccelerateDecelerateInterpolator.class);
        add(AccelerateInterpolator.class);
        add(AnticipateOvershootInterpolator.class);
        add(FastOutLinearInInterpolator.class);
        add(LinearOutSlowInInterpolator.class);
        add(OvershootInterpolator.class);
    }};

    try {
        interpolatorSelector = (Interpolator) interpolatorList.get(animateSelector).newInstance();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
AddressSelector.java 文件源码 项目:JDLinkerSelector 阅读 21 收藏 0 点赞 0 评论 0
private AnimatorSet buildIndicatorAnimatorTowards(TextView tab) {
    ObjectAnimator xAnimator = ObjectAnimator.ofFloat(indicator, "X", indicator.getX(), tab.getX());

    final ViewGroup.LayoutParams params = indicator.getLayoutParams();
    ValueAnimator widthAnimator = ValueAnimator.ofInt(params.width, tab.getMeasuredWidth());
    widthAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            params.width = (int) animation.getAnimatedValue();
            indicator.setLayoutParams(params);
        }
    });

    AnimatorSet set = new AnimatorSet();
    set.setInterpolator(new FastOutSlowInInterpolator());
    set.playTogether(xAnimator, widthAnimator);

    return set;
}
PostActivity.java 文件源码 项目:materialup 阅读 30 收藏 0 点赞 0 评论 0
private void handleVote(Upvote vote) {
    shot.setVoted(fab.isChecked());
    int count = vote.count;
    if (!fab.isChecked() && count > 0) {
        count -= 1;
    }

    if (count != shot.getVotes()) {
        shot.setVotes(count);
        updateVoteCount();
        AnimatorSet s = new AnimatorSet();
        s.setDuration(300).setInterpolator(new FastOutSlowInInterpolator());
        s.playTogether(
                ObjectAnimator.ofFloat(voteCount, "alpha", 0, 1, 1, 1),
                ObjectAnimator.ofFloat(voteCount, "scaleX", 0.3f, 1.05f, 0.9f, 1),
                ObjectAnimator.ofFloat(voteCount, "scaleY", 0.3f, 1.05f, 0.9f, 1));
        s.start();
    }
}
RollUpView.java 文件源码 项目:FabMenu 阅读 18 收藏 0 点赞 0 评论 0
private void toggleFab(View view, int delay, float scale, final boolean last) {

        ViewCompat.animate(view)
                .setStartDelay(delay)
                .scaleX(scale)
                .scaleY(scale)
                .setInterpolator(new FastOutSlowInInterpolator())
                .withEndAction(new Runnable() {
                    @Override
                    public void run() {
                        if (last) {
                            uiLinearLayout.setVisibility(View.GONE);
                        }
                    }
                })
                .start();
    }
ClockWiseView.java 文件源码 项目:FabMenu 阅读 20 收藏 0 点赞 0 评论 0
private void toggleFab(View view, int delay, float scale, final boolean last) {

        ViewCompat.animate(view)
                .setStartDelay(delay)
                .scaleX(scale)
                .scaleY(scale)
                .setInterpolator(new FastOutSlowInInterpolator())
                .withEndAction(new Runnable() {
                    @Override
                    public void run() {
                        if (last) {
                            mUiLayout.setVisibility(View.GONE);
                        }
                    }
                })
                .start();
    }
ElasticDragDismissDelegate.java 文件源码 项目:ElasticDragDismissLayout 阅读 21 收藏 0 点赞 0 评论 0
public void onStopNestedScroll(View child) {
    if (Math.abs(totalDrag) >= dragDismissDistance) {
        dispatchDismissCallback();
    } else { // settle back to natural position
        ViewPropertyAnimator animator = mViewGroup.animate()
                .translationY(0f)
                .scaleY(1f)
                .setDuration(200L)
                .setInterpolator(new FastOutSlowInInterpolator())
                .setListener(null);
        if (enableScaleX) {
            animator.scaleX(1f);
        }

        animator.start();

        totalDrag = 0;
        draggingDown = draggingUp = false;
        dispatchDragCallback(0f, 0f, 0f, 0f);
    }
}
LightBox.java 文件源码 项目:react-native-navigation 阅读 24 收藏 0 点赞 0 评论 0
private void animateShow() {
    ObjectAnimator yTranslation = ObjectAnimator.ofFloat(content, View.TRANSLATION_Y, 80, 0).setDuration(400);
    yTranslation.setInterpolator(new FastOutSlowInInterpolator());
    yTranslation.addListener(new AnimatorListenerAdapter() {
        @Override
        public void onAnimationStart(Animator animation) {
            content.setAlpha(1);
        }
    });

    ObjectAnimator lightBoxAlpha = ObjectAnimator.ofFloat(lightBox, View.ALPHA, 0, 1).setDuration(70);

    AnimatorSet animatorSet = new AnimatorSet();
    animatorSet.playTogether(lightBoxAlpha, yTranslation);
    animatorSet.start();
}
EmptyActivity.java 文件源码 项目:MaterialTapTargetPrompt 阅读 28 收藏 0 点赞 0 评论 0
public void showSideNavigationPrompt(View view)
{
    final MaterialTapTargetPrompt.Builder tapTargetPromptBuilder = new MaterialTapTargetPrompt.Builder(this)
            .setPrimaryText(R.string.menu_prompt_title)
            .setSecondaryText(R.string.menu_prompt_description)
            .setAnimationInterpolator(new FastOutSlowInInterpolator())
            .setMaxTextWidth(R.dimen.tap_target_menu_max_width)
            .setIcon(R.drawable.ic_back);
    final Toolbar tb = this.findViewById(android.support.v7.appcompat.R.id.action_bar);
    tapTargetPromptBuilder.setTarget(tb.getChildAt(1));

    tapTargetPromptBuilder.setPromptStateChangeListener(new MaterialTapTargetPrompt.PromptStateChangeListener()
    {
        @Override
        public void onPromptStateChanged(@NonNull MaterialTapTargetPrompt prompt, int state)
        {
            if (state == MaterialTapTargetPrompt.STATE_FOCAL_PRESSED)
            {
                //Do something such as storing a value so that this prompt is never shown again
            }
        }
    });
    tapTargetPromptBuilder.show();
}
EmptyActivity.java 文件源码 项目:MaterialTapTargetPrompt 阅读 26 收藏 0 点赞 0 评论 0
public void showOverflowPrompt(View view)
{
    final MaterialTapTargetPrompt.Builder tapTargetPromptBuilder = new MaterialTapTargetPrompt.Builder(this)
            .setPrimaryText(R.string.overflow_prompt_title)
            .setSecondaryText(R.string.overflow_prompt_description)
            .setAnimationInterpolator(new FastOutSlowInInterpolator())
            .setMaxTextWidth(R.dimen.tap_target_menu_max_width)
            .setIcon(R.drawable.ic_more_vert);
    final Toolbar tb = this.findViewById(android.support.v7.appcompat.R.id.action_bar);
    final View child = tb.getChildAt(2);
    if (child instanceof ActionMenuView)
    {
        final ActionMenuView actionMenuView = ((ActionMenuView) child);
        tapTargetPromptBuilder.setTarget(actionMenuView.getChildAt(actionMenuView.getChildCount() - 1));
    }
    else
    {
        Toast.makeText(this, R.string.overflow_unavailable, Toast.LENGTH_SHORT);
    }
    tapTargetPromptBuilder.show();
}
MainActivity.java 文件源码 项目:MaterialTapTargetPrompt 阅读 18 收藏 0 点赞 0 评论 0
public void showSideNavigationPrompt(View view)
{
    final MaterialTapTargetPrompt.Builder tapTargetPromptBuilder = new MaterialTapTargetPrompt.Builder(this)
            .setPrimaryText(R.string.menu_prompt_title)
            .setSecondaryText(R.string.menu_prompt_description)
            .setFocalPadding(R.dimen.dp40)
            .setAnimationInterpolator(new FastOutSlowInInterpolator())
            .setMaxTextWidth(R.dimen.tap_target_menu_max_width)
            .setIcon(R.drawable.ic_menu);
    final Toolbar tb = this.findViewById(R.id.toolbar);
    tapTargetPromptBuilder.setTarget(tb.getChildAt(1));

    tapTargetPromptBuilder.setPromptStateChangeListener(new MaterialTapTargetPrompt.PromptStateChangeListener()
    {
        @Override
        public void onPromptStateChanged(@NonNull MaterialTapTargetPrompt prompt, int state)
        {
            if (state == MaterialTapTargetPrompt.STATE_FOCAL_PRESSED)
            {
                //Do something such as storing a value so that this prompt is never shown again
            }
        }
    });
    tapTargetPromptBuilder.show();
}
MainActivity.java 文件源码 项目:MaterialTapTargetPrompt 阅读 18 收藏 0 点赞 0 评论 0
public void showOverflowPrompt(View view)
{
    final MaterialTapTargetPrompt.Builder tapTargetPromptBuilder = new MaterialTapTargetPrompt.Builder(this)
            .setPrimaryText(R.string.overflow_prompt_title)
            .setSecondaryText(R.string.overflow_prompt_description)
            .setAnimationInterpolator(new FastOutSlowInInterpolator())
            .setMaxTextWidth(R.dimen.tap_target_menu_max_width)
            .setIcon(R.drawable.ic_more_vert);
    final Toolbar tb = this.findViewById(R.id.toolbar);
    final View child = tb.getChildAt(2);
    if (child instanceof ActionMenuView)
    {
        final ActionMenuView actionMenuView = ((ActionMenuView) child);
        tapTargetPromptBuilder.setTarget(actionMenuView.getChildAt(actionMenuView.getChildCount() - 1));
    }
    else
    {
        Toast.makeText(this, R.string.overflow_unavailable, Toast.LENGTH_SHORT);
    }
    tapTargetPromptBuilder.show();
}
DialogStyleActivity.java 文件源码 项目:MaterialTapTargetPrompt 阅读 24 收藏 0 点赞 0 评论 0
public void showSideNavigationPrompt(View view)
{
    final MaterialTapTargetPrompt.Builder tapTargetPromptBuilder = new MaterialTapTargetPrompt.Builder(this)
            .setPrimaryText(R.string.menu_prompt_title)
            .setSecondaryText(R.string.menu_prompt_description)
            .setAnimationInterpolator(new FastOutSlowInInterpolator())
            .setMaxTextWidth(R.dimen.tap_target_menu_max_width)
            .setIcon(R.drawable.ic_back)
            .setClipToView(findViewById(R.id.dialog_view));
    final Toolbar tb = this.findViewById(R.id.toolbar);
    tapTargetPromptBuilder.setTarget(tb.getChildAt(1));

    tapTargetPromptBuilder.setPromptStateChangeListener(new MaterialTapTargetPrompt.PromptStateChangeListener()
    {
        @Override
        public void onPromptStateChanged(@NonNull MaterialTapTargetPrompt prompt, int state)
        {
            if (state == MaterialTapTargetPrompt.STATE_FOCAL_PRESSED)
            {
                //Do something such as storing a value so that this prompt is never shown again
            }
        }
    });
    tapTargetPromptBuilder.show();
}
DialogStyleActivity.java 文件源码 项目:MaterialTapTargetPrompt 阅读 24 收藏 0 点赞 0 评论 0
public void showOverflowPrompt(View view)
{
    final MaterialTapTargetPrompt.Builder tapTargetPromptBuilder = new MaterialTapTargetPrompt.Builder(this)
            .setPrimaryText(R.string.overflow_prompt_title)
            .setSecondaryText(R.string.overflow_prompt_description)
            .setAnimationInterpolator(new FastOutSlowInInterpolator())
            .setMaxTextWidth(R.dimen.max_prompt_width)
            .setIcon(R.drawable.ic_more_vert)
            .setClipToView(findViewById(R.id.dialog_view));
    final Toolbar tb = this.findViewById(R.id.toolbar);
    final View child = tb.getChildAt(2);
    if (child instanceof ActionMenuView)
    {
        final ActionMenuView actionMenuView = ((ActionMenuView) child);
        tapTargetPromptBuilder.setTarget(actionMenuView.getChildAt(actionMenuView.getChildCount() - 1));
    }
    else
    {
        Toast.makeText(this, R.string.overflow_unavailable, Toast.LENGTH_SHORT);
    }
    tapTargetPromptBuilder.show();
}
MotionSpecTest.java 文件源码 项目:material-components-android 阅读 32 收藏 0 点赞 0 评论 0
@Test
public void validateSetOfObjectAnimatorTranslationMotionTiming() {
  MotionSpec spec =
      MotionSpec.createFromResource(
          activityTestRule.getActivity(), R.animator.valid_set_of_object_animator_motion_spec);
  MotionTiming translation = spec.getTiming("translation");

  assertEquals(11, translation.getDelay());
  assertEquals(13, translation.getDuration());
  if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
    assertThat(translation.getInterpolator(), instanceOf(PathInterpolator.class));
  } else {
    assertThat(translation.getInterpolator(), instanceOf(FastOutSlowInInterpolator.class));
  }
  assertEquals(17, translation.getRepeatCount());
  assertEquals(ValueAnimator.REVERSE, translation.getRepeatMode());
}
MessageActivity.java 文件源码 项目:TransitionAnimator 阅读 29 收藏 0 点赞 0 评论 0
public void executeTransition() {
    postponeEnterTransition();

    final View decorView = getWindow().getDecorView();
    getWindow().getDecorView().getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
        @Override
        public boolean onPreDraw() {
            decorView.getViewTreeObserver().removeOnPreDrawListener(this);
            supportStartPostponedEnterTransition();
            return true;
        }
    });

    MyTransition transition = new MyTransition();
    transition.setPositionDuration(300);
    transition.setSizeDuration(300);
    transition.setPositionInterpolator(new FastOutLinearInInterpolator());
    transition.setSizeInterpolator(new FastOutSlowInInterpolator());
    transition.addTarget("message");

    getWindow().setSharedElementEnterTransition(transition);
}
ScalingPageIndicator.java 文件源码 项目:FMTech 阅读 21 收藏 0 点赞 0 评论 0
@TargetApi(14)
public final Animator createScaleAnimator(final View paramView, float paramFloat1, float paramFloat2, long paramLong)
{
  ValueAnimator localValueAnimator = ValueAnimator.ofFloat(new float[] { paramFloat1, paramFloat2 });
  localValueAnimator.setDuration(paramLong);
  if (Build.VERSION.SDK_INT >= 21) {
    localValueAnimator.setInterpolator(PlayInterpolators.fastOutSlowIn(paramView.getContext()));
  }
  for (;;)
  {
    localValueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
    {
      public final void onAnimationUpdate(ValueAnimator paramAnonymousValueAnimator)
      {
        float f = ((Float)paramAnonymousValueAnimator.getAnimatedValue()).floatValue();
        paramView.setScaleX(f);
        paramView.setScaleY(f);
      }
    });
    return localValueAnimator;
    localValueAnimator.setInterpolator(new FastOutSlowInInterpolator());
  }
}
BottomButton.java 文件源码 项目:citrus 阅读 29 收藏 0 点赞 0 评论 0
/**
 *
 * @param parent
 * @param bb
 * @param snackbar
 */
private void updateFabTranslationForSnackbar(CoordinatorLayout parent, BottomButton bb, View snackbar) {
    float translationY = this.getFabTranslationYForSnackbar(parent, bb);
    if (translationY != this.mTranslationY) {
        ViewCompat.animate(bb).cancel();
        if (Math.abs(translationY - this.mTranslationY) == (float) snackbar.getHeight()) {
            ViewCompat.animate(bb).translationY(translationY).setInterpolator(new FastOutSlowInInterpolator())
                    .setListener((ViewPropertyAnimatorListener) null);
        } else {
            ViewCompat.setTranslationY(bb, translationY);
        }

        this.mTranslationY = translationY;
    }

}
InfoTooltipView.java 文件源码 项目:anime-android-go-99 阅读 20 收藏 0 点赞 0 评论 0
public void dismiss(boolean immediate) {
    if (immediate) {
        dismissNow();
    } else {
        animatorFor(text, animatorContext)
                .withInterpolator(new FastOutSlowInInterpolator())
                .fadeOut(INVISIBLE)
                .addOnAnimationCompleted(new OnAnimationCompleted() {
                    @Override
                    public void onAnimationCompleted(boolean finished) {
                        dismissNow();
                    }
                })
                .start();
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号