本文整理汇总了Java中android.support.v4.view.ViewPropertyAnimatorListener类的典型用法代码示例。如果您正苦于以下问题:Java ViewPropertyAnimatorListener类的具体用法?Java ViewPropertyAnimatorListener怎么用?Java ViewPropertyAnimatorListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ViewPropertyAnimatorListener类属于android.support.v4.view包,在下文中一共展示了ViewPropertyAnimatorListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateFabTranslationForSnackbar
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
/**
*
* @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;
}
}
示例2: animateAddImpl
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
@Override
public boolean animateAddImpl(ViewPropertyAnimatorListener listener, long addDuration, int index) {
ViewCompat.animate(itemView)
.translationY(0)
.alpha(1)
.setDuration(addDuration)
.setInterpolator(new DecelerateInterpolator())
.setListener(listener)
.start();
return true;
}
示例3: animateAddImpl
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
@Override
public boolean animateAddImpl(ViewPropertyAnimatorListener listener, long addDuration, int index) {
if (DatabaseConfiguration.subItemSpecificAnimation) {
ViewCompat.animate(itemView)
.rotationX(0)
.setDuration(addDuration)
.setInterpolator(new DecelerateInterpolator())
.setListener(listener)
.setStartDelay(index * 150L)
.start();
return true;
}
return false;
}
示例4: animateRemoveImpl
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
@Override
public boolean animateRemoveImpl(ViewPropertyAnimatorListener listener, long removeDuration, int index) {
if (DatabaseConfiguration.subItemSpecificAnimation) {
ViewCompat.animate(itemView)
.rotationX(90)
.setDuration(removeDuration)
.setInterpolator(new DecelerateInterpolator())
.setListener(listener)
.setStartDelay(index * 40L)
.start();
return true;
}
return false;
}
示例5: translateDown
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
public static void translateDown(View view, ViewPropertyAnimatorListener listener) {
int height = view.getHeight();
ViewGroup.LayoutParams params = view.getLayoutParams();
ViewGroup.MarginLayoutParams layoutParams = params instanceof ViewGroup.MarginLayoutParams ? ((ViewGroup.MarginLayoutParams) params) : null;
if (layoutParams != null) height += layoutParams.bottomMargin;
ViewCompat.animate(view).translationY(height).setDuration(DURATION).setListener(listener).setInterpolator(INTERPOLATOR).withLayer().start();
}
示例6: scaleShow
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
public static void scaleShow(View view, ViewPropertyAnimatorListener viewPropertyAnimatorListener) {
view.setVisibility(View.VISIBLE);
ViewCompat.animate(view)
.scaleX(1.0f)
.scaleY(1.0f)
.alpha(1.0f)
.setDuration(800)
.setListener(viewPropertyAnimatorListener)
.setInterpolator(FAST_OUT_SLOW_IN_INTERPOLATOR)
.start();
}
示例7: scaleHide
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
public static void scaleHide(View view, ViewPropertyAnimatorListener viewPropertyAnimatorListener) {
ViewCompat.animate(view)
.scaleX(0.0f)
.scaleY(0.0f)
.alpha(0.0f)
.setDuration(800)
.setInterpolator(FAST_OUT_SLOW_IN_INTERPOLATOR)
.setListener(viewPropertyAnimatorListener)
.start();
}
示例8: translateShow
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
public static void translateShow(View view, ViewPropertyAnimatorListener viewPropertyAnimatorListener) {
view.setVisibility(View.VISIBLE);
ViewCompat.animate(view)
.translationY(0)
.setDuration(400)
.setListener(viewPropertyAnimatorListener)
.setInterpolator(FAST_OUT_SLOW_IN_INTERPOLATOR)
.start();
}
示例9: translateHide
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
public static void translateHide(View view, ViewPropertyAnimatorListener viewPropertyAnimatorListener) {
view.setVisibility(View.VISIBLE);
ViewCompat.animate(view)
.translationY(260)
.setDuration(400)
.setInterpolator(FAST_OUT_SLOW_IN_INTERPOLATOR)
.setListener(viewPropertyAnimatorListener)
.start();
}
示例10: animateAddImpl
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
@Override
public void animateAddImpl(RecyclerView.ViewHolder holder,
ViewPropertyAnimatorListener listener) {
ViewCompat.animate(itemView)
.translationY(0)
.alpha(1)
.setDuration(300)
.setListener(listener)
.start();
}
示例11: animateRemoveImpl
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
@Override
public void animateRemoveImpl(RecyclerView.ViewHolder holder,
ViewPropertyAnimatorListener listener) {
ViewCompat.animate(itemView)
.translationY(-itemView.getHeight() * 0.3f)
.alpha(0)
.setDuration(300)
.setListener(listener)
.start();
}
示例12: setListener
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
public final ViewPropertyAnimatorCompatSet setListener(ViewPropertyAnimatorListener paramViewPropertyAnimatorListener)
{
if (!this.mIsStarted) {
this.mListener = paramViewPropertyAnimatorListener;
}
return this;
}
示例13: animateAddImpl
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
@Override
public boolean animateAddImpl(ViewPropertyAnimatorListener listener, long addDuration, int index) {
ViewCompat.animate(itemView)
.translationY(0)
.alpha(1)
.setDuration(addDuration)
.setInterpolator(new DecelerateInterpolator())
.setListener(listener)
.start();
return true;
}
示例14: animateAddImpl
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
@Override
public boolean animateAddImpl(ViewPropertyAnimatorListener listener, long addDuration, int index) {
if (DatabaseConfiguration.subItemSpecificAnimation) {
ViewCompat.animate(itemView)
.rotationX(0)
.setDuration(addDuration)
.setInterpolator(new DecelerateInterpolator())
.setListener(listener)
.setStartDelay(index * 150L)
.start();
return true;
}
return false;
}
示例15: animateRemoveImpl
import android.support.v4.view.ViewPropertyAnimatorListener; //导入依赖的package包/类
@Override
public boolean animateRemoveImpl(ViewPropertyAnimatorListener listener, long removeDuration, int index) {
if (DatabaseConfiguration.subItemSpecificAnimation) {
ViewCompat.animate(itemView)
.rotationX(90)
.setDuration(removeDuration)
.setInterpolator(new DecelerateInterpolator())
.setListener(listener)
.setStartDelay(index * 40L)
.start();
return true;
}
return false;
}