/**
* Creates and returns an animation listener, which allows to restore the original state of a
* tab, when an animation, which zooms in the tab, has been ended.
*
* @param item
* The item, which corresponds to the tab, which has been zoomed in, 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
*/
private AnimatorListener createZoomInAnimationListener(@NonNull final AbstractItem item) {
return new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(final Animator animation) {
super.onAnimationEnd(animation);
getModel().addListener(PhoneTabSwitcherLayout.this);
tabViewRecycler.inflate(item);
tabViewRecycler.clearCache();
tabRecyclerAdapter.clearCachedPreviews();
tabViewBottomMargin = -1;
}
};
}
PhoneTabSwitcherLayout.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:ChromeLikeTabSwitcher
作者:
评论列表
文章目录