本文整理匯總了Java中com.h6ah4i.android.widget.advrecyclerview.animator.impl.ChangeAnimationInfo類的典型用法代碼示例。如果您正苦於以下問題:Java ChangeAnimationInfo類的具體用法?Java ChangeAnimationInfo怎麽用?Java ChangeAnimationInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ChangeAnimationInfo類屬於com.h6ah4i.android.widget.advrecyclerview.animator.impl包,在下文中一共展示了ChangeAnimationInfo類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreateChangeAnimationForOldItem
import com.h6ah4i.android.widget.advrecyclerview.animator.impl.ChangeAnimationInfo; //導入依賴的package包/類
@Override
protected void onCreateChangeAnimationForOldItem(ChangeAnimationInfo info) {
final ViewPropertyAnimatorCompat animator = ViewCompat.animate(info.oldHolder.itemView);
animator.setDuration(getDuration());
animator.translationX(info.toX - info.fromX);
animator.translationY(info.toY - info.fromY);
animator.alpha(0);
startActiveItemAnimation(info, info.oldHolder, animator);
}
開發者ID:fabricethilaw,項目名稱:expandable-recyclerview-with-gridlayout,代碼行數:12,代碼來源:SwipeDismissItemAnimator.java
示例2: onCreateChangeAnimationForNewItem
import com.h6ah4i.android.widget.advrecyclerview.animator.impl.ChangeAnimationInfo; //導入依賴的package包/類
@Override
protected void onCreateChangeAnimationForNewItem(ChangeAnimationInfo info) {
final ViewPropertyAnimatorCompat animator = ViewCompat.animate(info.newHolder.itemView);
animator.translationX(0);
animator.translationY(0);
animator.setDuration(getDuration());
animator.alpha(1);
startActiveItemAnimation(info, info.newHolder, animator);
}
開發者ID:fabricethilaw,項目名稱:expandable-recyclerview-with-gridlayout,代碼行數:12,代碼來源:SwipeDismissItemAnimator.java
示例3: onAnimationEndedSuccessfully
import com.h6ah4i.android.widget.advrecyclerview.animator.impl.ChangeAnimationInfo; //導入依賴的package包/類
@Override
protected void onAnimationEndedSuccessfully(ChangeAnimationInfo info, RecyclerView.ViewHolder item) {
final View view = item.itemView;
ViewCompat.setAlpha(view, 1);
ViewCompat.setTranslationX(view, 0);
ViewCompat.setTranslationY(view, 0);
}
開發者ID:fabricethilaw,項目名稱:expandable-recyclerview-with-gridlayout,代碼行數:8,代碼來源:SwipeDismissItemAnimator.java
示例4: onAnimationEndedBeforeStarted
import com.h6ah4i.android.widget.advrecyclerview.animator.impl.ChangeAnimationInfo; //導入依賴的package包/類
@Override
protected void onAnimationEndedBeforeStarted(ChangeAnimationInfo info, RecyclerView.ViewHolder item) {
final View view = item.itemView;
ViewCompat.setAlpha(view, 1);
ViewCompat.setTranslationX(view, 0);
ViewCompat.setTranslationY(view, 0);
}
開發者ID:fabricethilaw,項目名稱:expandable-recyclerview-with-gridlayout,代碼行數:8,代碼來源:SwipeDismissItemAnimator.java
示例5: addPendingAnimation
import com.h6ah4i.android.widget.advrecyclerview.animator.impl.ChangeAnimationInfo; //導入依賴的package包/類
@Override
public boolean addPendingAnimation(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromX, int fromY, int toX, int toY) {
final float prevTranslationX = ViewCompat.getTranslationX(oldHolder.itemView);
final float prevTranslationY = ViewCompat.getTranslationY(oldHolder.itemView);
final float prevAlpha = ViewCompat.getAlpha(oldHolder.itemView);
endAnimation(oldHolder);
final int deltaX = (int) (toX - fromX - prevTranslationX);
final int deltaY = (int) (toY - fromY - prevTranslationY);
// recover prev translation state after ending animation
ViewCompat.setTranslationX(oldHolder.itemView, prevTranslationX);
ViewCompat.setTranslationY(oldHolder.itemView, prevTranslationY);
ViewCompat.setAlpha(oldHolder.itemView, prevAlpha);
if (newHolder != null) {
// carry over translation values
endAnimation(newHolder);
ViewCompat.setTranslationX(newHolder.itemView, -deltaX);
ViewCompat.setTranslationY(newHolder.itemView, -deltaY);
ViewCompat.setAlpha(newHolder.itemView, 0);
}
enqueuePendingAnimationInfo(new ChangeAnimationInfo(oldHolder, newHolder, fromX, fromY, toX, toY));
return true;
}
開發者ID:fabricethilaw,項目名稱:expandable-recyclerview-with-gridlayout,代碼行數:29,代碼來源:SwipeDismissItemAnimator.java
示例6: addPendingAnimation
import com.h6ah4i.android.widget.advrecyclerview.animator.impl.ChangeAnimationInfo; //導入依賴的package包/類
@Override
public boolean addPendingAnimation(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromX, int fromY, int toX, int toY) {
final float prevTranslationX = ViewCompat.getTranslationX(oldHolder.itemView);
final float prevTranslationY = ViewCompat.getTranslationY(oldHolder.itemView);
final float prevAlpha = ViewCompat.getAlpha(oldHolder.itemView);
endAnimation(oldHolder);
final int deltaX = (int) (toX - fromX - prevTranslationX);
final int deltaY = (int) (toY - fromY - prevTranslationY);
// recover prev translation state after ending animation
ViewCompat.setTranslationX(oldHolder.itemView, prevTranslationX);
ViewCompat.setTranslationY(oldHolder.itemView, prevTranslationY);
ViewCompat.setAlpha(oldHolder.itemView, prevAlpha);
if (newHolder != null && newHolder.itemView != null) {
// carry over translation values
endAnimation(newHolder);
ViewCompat.setTranslationX(newHolder.itemView, -deltaX);
ViewCompat.setTranslationY(newHolder.itemView, -deltaY);
ViewCompat.setAlpha(newHolder.itemView, 0);
}
enqueuePendingAnimationInfo(new ChangeAnimationInfo(oldHolder, newHolder, fromX, fromY, toX, toY));
return true;
}
示例7: onAnimationCancel
import com.h6ah4i.android.widget.advrecyclerview.animator.impl.ChangeAnimationInfo; //導入依賴的package包/類
@Override
protected void onAnimationCancel(ChangeAnimationInfo info, RecyclerView.ViewHolder item) {
}
開發者ID:fabricethilaw,項目名稱:expandable-recyclerview-with-gridlayout,代碼行數:4,代碼來源:SwipeDismissItemAnimator.java