/**
* Creates and returns a listener, which allows to handle, when a tab has been swiped, but was
* not removed.
*
* @param item
* The item, which corresponds to the tab, which has been swiped, as an instance of the
* class {@link AbstractItem}. The item may not be null
* @return The listener, which has been created, as an instance of the type {@link
* AnimatorListener}. The listener may not be null
*/
@NonNull
private AnimatorListener createSwipeAnimationListener(@NonNull final AbstractItem item) {
return new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(final Animator animation) {
super.onAnimationEnd(animation);
inflateOrRemoveView(item, false);
adaptStackOnSwipeAborted(item, item.getIndex() + 1);
item.getTag().setClosing(false);
getArithmetics().setPivot(Axis.DRAGGING_AXIS, item,
getArithmetics().getPivot(Axis.DRAGGING_AXIS, item, DragState.NONE));
animateToolbarVisibility(true, 0);
}
};
}
PhoneTabSwitcherLayout.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:ChromeLikeTabSwitcher
作者:
评论列表
文章目录