/**
* Starts a reveal animation to add a specific tab.
*
* @param tabItem
* The tab item, which corresponds to the tab, which should be added, as an instance of
* the class {@link TabItem}. The tab item may not be null
* @param revealAnimation
* The reveal animation, which should be started, as an instance of the class {@link
* RevealAnimation}. The reveal animation may not be null
*/
private void animateReveal(@NonNull final TabItem tabItem,
@NonNull final RevealAnimation revealAnimation) {
tabViewBottomMargin = -1;
recyclerAdapter.clearCachedPreviews();
dragHandler.setCallback(null);
View view = tabItem.getView();
ViewPropertyAnimator animation = view.animate();
animation.setInterpolator(
revealAnimation.getInterpolator() != null ? revealAnimation.getInterpolator() :
new AccelerateDecelerateInterpolator());
animation.setListener(new AnimationListenerWrapper(createHideSwitcherAnimationListener()));
animation.setStartDelay(0);
animation.setDuration(revealAnimation.getDuration() != -1 ? revealAnimation.getDuration() :
revealAnimationDuration);
getArithmetics().animateScale(Axis.DRAGGING_AXIS, animation, 1);
getArithmetics().animateScale(Axis.ORTHOGONAL_AXIS, animation, 1);
animation.start();
animateToolbarVisibility(getModel().areToolbarsShown() && getModel().isEmpty(), 0);
}
PhoneTabSwitcherLayout.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:NeoTerm
作者:
评论列表
文章目录