本文整理了Java中android.view.ViewPropertyAnimator.setInterpolator()
方法的一些代码示例,展示了ViewPropertyAnimator.setInterpolator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViewPropertyAnimator.setInterpolator()
方法的具体详情如下:
包路径:android.view.ViewPropertyAnimator
类名称:ViewPropertyAnimator
方法名:setInterpolator
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public ViewPropertyAnimator setInterpolator(Interpolator interpolator) {
android.view.ViewPropertyAnimator n = mNative.get();
if (n != null) {
n.setInterpolator(interpolator);
}
return this;
}
代码示例来源:origin: xinghongfei/LookLook
private void viewEnterAnimationNest(View view, float offset, Interpolator interp) {
view.setTranslationY(-offset);
view.animate()
.translationY(0f)
.alpha(1f)
.setDuration(50L)
.setInterpolator(interp)
.setListener(null)
.start();
}
代码示例来源:origin: xinghongfei/LookLook
@Override
protected void onResume() {
super.onResume();
mRelativeLayout.animate()
.alpha(1f)
.setDuration(1000L)
.setInterpolator(new AccelerateInterpolator())
.start();
}
代码示例来源:origin: Yalantis/uCrop
@Override
public void onLoadComplete() {
mUCropView.animate().alpha(1).setDuration(300).setInterpolator(new AccelerateInterpolator());
mBlockingView.setClickable(false);
mShowLoader = false;
supportInvalidateOptionsMenu();
}
代码示例来源:origin: Yalantis/uCrop
@Override
public void onLoadComplete() {
mUCropView.animate().alpha(1).setDuration(300).setInterpolator(new AccelerateInterpolator());
mBlockingView.setClickable(false);
callback.loadingProgress(false);
}
代码示例来源:origin: xinghongfei/LookLook
private void viewEnterAnimationNest(View view, float offset, Interpolator interp) {
view.setTranslationY(-offset);
view.setAlpha(0.3f);
view.animate()
.translationY(0f)
.alpha(1f)
.setDuration(500L)
.setInterpolator(interp)
.setListener(null)
.start();
}
代码示例来源:origin: frogermcs/InstaMaterial
private void animateUserProfileHeader() {
vUserProfileRoot.setTranslationY(-vUserProfileRoot.getHeight());
ivUserProfilePhoto.setTranslationY(-ivUserProfilePhoto.getHeight());
vUserDetails.setTranslationY(-vUserDetails.getHeight());
vUserStats.setAlpha(0);
vUserProfileRoot.animate().translationY(0).setDuration(300).setInterpolator(INTERPOLATOR);
ivUserProfilePhoto.animate().translationY(0).setDuration(300).setStartDelay(100).setInterpolator(INTERPOLATOR);
vUserDetails.animate().translationY(0).setDuration(300).setStartDelay(200).setInterpolator(INTERPOLATOR);
vUserStats.animate().alpha(1).setDuration(200).setStartDelay(400).setInterpolator(INTERPOLATOR).start();
}
}
代码示例来源:origin: arimorty/floatingsearchview
private void animateItem(View view) {
view.setTranslationY(Util.getScreenHeight((Activity) view.getContext()));
view.animate()
.translationY(0)
.setInterpolator(new DecelerateInterpolator(3.f))
.setDuration(700)
.start();
}
}
代码示例来源:origin: frogermcs/InstaMaterial
private void startIntroAnimation() {
vUpperPanel.animate().translationY(0).setDuration(400).setInterpolator(DECELERATE_INTERPOLATOR);
vLowerPanel.animate().translationY(0).setDuration(400).setInterpolator(DECELERATE_INTERPOLATOR).start();
}
代码示例来源:origin: frogermcs/InstaMaterial
private void animateContent() {
commentsAdapter.updateItems();
llAddComment.animate().translationY(0)
.setInterpolator(new DecelerateInterpolator())
.setDuration(200)
.start();
}
代码示例来源:origin: h6ah4i/android-advancedrecyclerview
protected void resetAnimation(@NonNull RecyclerView.ViewHolder holder) {
if (sDefaultInterpolator == null) {
sDefaultInterpolator = new ValueAnimator().getInterpolator();
}
holder.itemView.animate().setInterpolator(sDefaultInterpolator);
endAnimation(holder);
}
代码示例来源:origin: seven332/EhViewer
private void hideActionFab() {
if (null != mFabLayout && STATE_NORMAL == mState && mShowActionFab) {
mShowActionFab = false;
View fab = mFabLayout.getPrimaryFab();
fab.animate().scaleX(0.0f).scaleY(0.0f).setListener(mActionFabAnimatorListener)
.setDuration(ANIMATE_TIME).setStartDelay(0L)
.setInterpolator(AnimationUtils.SLOW_FAST_INTERPOLATOR).start();
}
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
private void hideFAB() {
mFAB.animate().scaleX(0f).scaleY(0f)
.setInterpolator(new AccelerateInterpolator())
.start();
mFAB.setClickable(false);
}
代码示例来源:origin: seven332/EhViewer
private void showActionFab() {
if (null != mFabLayout && STATE_NORMAL == mState && !mShowActionFab) {
mShowActionFab = true;
View fab = mFabLayout.getPrimaryFab();
fab.setVisibility(View.VISIBLE);
fab.setRotation(-45.0f);
fab.animate().scaleX(1.0f).scaleY(1.0f).rotation(0.0f).setListener(null)
.setDuration(ANIMATE_TIME).setStartDelay(0L)
.setInterpolator(AnimationUtils.FAST_SLOW_INTERPOLATOR).start();
}
}
代码示例来源:origin: frogermcs/InstaMaterial
private void startContentAnimation() {
fabCreate.animate()
.translationY(0)
.setInterpolator(new OvershootInterpolator(1.f))
.setStartDelay(300)
.setDuration(ANIM_DURATION_FAB)
.start();
feedAdapter.updateItems(true);
}
代码示例来源:origin: frogermcs/InstaMaterial
@Override
public void onSuccess() {
ivPhoto.animate()
.scaleX(1.f).scaleY(1.f)
.setInterpolator(new OvershootInterpolator())
.setDuration(400)
.setStartDelay(200)
.start();
}
代码示例来源:origin: frogermcs/InstaMaterial
private void animateUserProfileOptions() {
tlUserProfileTabs.setTranslationY(-tlUserProfileTabs.getHeight());
tlUserProfileTabs.animate().translationY(0).setDuration(300).setStartDelay(USER_OPTIONS_ANIMATION_DELAY).setInterpolator(INTERPOLATOR);
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
private void showFAB() {
mFAB.animate().scaleX(1f).scaleY(1f)
.setInterpolator(new OvershootInterpolator())
.start();
mFAB.setClickable(true);
}
代码示例来源:origin: nickbutcher/plaid
private void animateToolbar() {
// this is gross but toolbar doesn't expose it's children to animate them :(
View t = toolbar.getChildAt(0);
if (t != null && t instanceof TextView) {
TextView title = (TextView) t;
// fade in and space out the title. Animating the letterSpacing performs horribly so
// fake it by setting the desired letterSpacing then animating the scaleX ¯\_(ツ)_/¯
title.setAlpha(0f);
title.setScaleX(0.8f);
title.animate()
.alpha(1f)
.scaleX(1f)
.setStartDelay(300)
.setDuration(900)
.setInterpolator(AnimUtils.getFastOutSlowInInterpolator(this));
}
}
代码示例来源:origin: nickbutcher/plaid
private void showFab() {
fab.setAlpha(0f);
fab.setScaleX(0f);
fab.setScaleY(0f);
fab.setTranslationY(fab.getHeight() / 2);
fab.animate()
.alpha(1f)
.scaleX(1f)
.scaleY(1f)
.translationY(0f)
.setDuration(300L)
.setInterpolator(AnimUtils.getLinearOutSlowInInterpolator(this))
.start();
}
内容来源于网络,如有侵权,请联系作者删除!