當前位置: 首頁>>代碼示例>>Java>>正文


Java ViewPropertyAnimatorListener類代碼示例

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

}
 
開發者ID:eure,項目名稱:citrus,代碼行數:22,代碼來源:BottomButton.java

示例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;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:12,代碼來源:ScrollableFooterItem.java

示例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;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:15,代碼來源:AnimatorSubItem.java

示例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;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:15,代碼來源:AnimatorSubItem.java

示例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();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:8,代碼來源:AnimHelper.java

示例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();
}
 
開發者ID:Pingsh,項目名稱:Mix,代碼行數:12,代碼來源:AnimatorUtil.java

示例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();
}
 
開發者ID:Pingsh,項目名稱:Mix,代碼行數:11,代碼來源:AnimatorUtil.java

示例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();
}
 
開發者ID:GcsSloop,項目名稱:diycode,代碼行數:10,代碼來源:AnimatorUtil.java

示例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();
}
 
開發者ID:GcsSloop,項目名稱:diycode,代碼行數:10,代碼來源:AnimatorUtil.java

示例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();
}
 
開發者ID:Art2Cat,項目名稱:MoonlightNote,代碼行數:11,代碼來源:MoonlightViewHolder.java

示例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();
}
 
開發者ID:Art2Cat,項目名稱:MoonlightNote,代碼行數:11,代碼來源:MoonlightViewHolder.java

示例12: setListener

import android.support.v4.view.ViewPropertyAnimatorListener; //導入依賴的package包/類
public final ViewPropertyAnimatorCompatSet setListener(ViewPropertyAnimatorListener paramViewPropertyAnimatorListener)
{
  if (!this.mIsStarted) {
    this.mListener = paramViewPropertyAnimatorListener;
  }
  return this;
}
 
開發者ID:ChiangC,項目名稱:FMTech,代碼行數:8,代碼來源:ViewPropertyAnimatorCompatSet.java

示例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;
}
 
開發者ID:davideas,項目名稱:FlexibleAdapter,代碼行數:12,代碼來源:ScrollableFooterItem.java

示例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;
}
 
開發者ID:davideas,項目名稱:FlexibleAdapter,代碼行數:15,代碼來源:AnimatorSubItem.java

示例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;
}
 
開發者ID:davideas,項目名稱:FlexibleAdapter,代碼行數:15,代碼來源:AnimatorSubItem.java


注:本文中的android.support.v4.view.ViewPropertyAnimatorListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。