本文整理匯總了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;
}