|
|
@@ -406,11 +406,11 @@ public class ActionBarHelper extends Helper {
|
|
|
|
|
|
if (newBuilder.isVisibleCategory) {
|
|
|
newBuilder.arrowListener = navigationBar1 -> {
|
|
|
- setCategoryTabVisible();
|
|
|
+ setCategoryTabVisible(true);
|
|
|
};
|
|
|
|
|
|
newBuilder.titleListener = navigationBar12 -> {
|
|
|
- setCategoryTabVisible();
|
|
|
+ setCategoryTabVisible(true);
|
|
|
};
|
|
|
|
|
|
int len = categoryMainTab.getChildCount();
|
|
|
@@ -422,7 +422,7 @@ public class ActionBarHelper extends Helper {
|
|
|
newBuilder.categoryListener.onClick(actionBar, selectIndex);
|
|
|
setFocusCategoryAt(selectIndex);
|
|
|
navigationBar.toggleArrow();
|
|
|
- setCategoryTabVisible();
|
|
|
+ setCategoryTabVisible(false);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -462,17 +462,24 @@ public class ActionBarHelper extends Helper {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void setCategoryTabVisible() {
|
|
|
+ private void setCategoryTabVisible(boolean isAnim) {
|
|
|
|
|
|
if (navigationBar.isArrowOpened()) {
|
|
|
layoutCategoryTab.setVisibility(View.VISIBLE);
|
|
|
-// layoutCategoryTab.setTranslationY((float) -ResourceUtil.dpToPx(123));
|
|
|
-// layoutCategoryTab.animate().withLayer().translationY(0f).setDuration(500).start();
|
|
|
+ if (isAnim) {
|
|
|
+ layoutCategoryTab.setTranslationY((float) -ResourceUtil.dpToPx(123));
|
|
|
+ layoutCategoryTab.animate().withLayer().translationY(0f).setDuration(400).start();
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
-// layoutCategoryTab.setTranslationY(0f);
|
|
|
-// layoutCategoryTab.animate().withLayer().translationY((float) -ResourceUtil.dpToPx(123)).setDuration(500).start();
|
|
|
- layoutCategoryTab.setVisibility(View.GONE);
|
|
|
+ if (isAnim) {
|
|
|
+ layoutCategoryTab.animate().withLayer().translationY((float) -ResourceUtil.dpToPx(123)).setDuration(400).start();
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ layoutCategoryTab.setVisibility(View.GONE);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (null != titleClickListener) {
|