I have Toolbar
with TabLayout
which I would like to hide / show at some points, I would like to animate the process of hide / show tabs (the toolbar remains visible) ... a large-scale animation does not TabLayout
hide it, but the height of the toolbar remains the same, as if the tabs were there ... any suggestions?
public void showTabs(boolean show) {
if (show) {
tabLayout.animate().scaleY(1).setInterpolator(new DecelerateInterpolator()).start();
} else {
tabLayout.animate().scaleY(0).setInterpolator(new AccelerateInterpolator()).start();
}
}
source
share