/**
* Creates and returns a listener, which allows to handle, when a tab has been swiped, but was
* not removed.
*
* @param tabItem
* The tab item, which corresponds to the tab, which has been swiped, as an instance of
* the class {@link TabItem}. The tab 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 TabItem tabItem) {
return new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(final Animator animation) {
super.onAnimationEnd(animation);
inflateOrRemoveView(tabItem);
View view = tabItem.getView();
adaptStackOnSwipeAborted(tabItem, tabItem.getIndex() + 1);
tabItem.getTag().setClosing(false);
getArithmetics().setPivot(Axis.DRAGGING_AXIS, view,
getArithmetics().getPivot(Axis.DRAGGING_AXIS, view, DragState.NONE));
animateToolbarVisibility(true, 0);
}
};
}
PhoneTabSwitcherLayout.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:NeoTerm
作者:
评论列表
文章目录