I used Collapsible Toolbarin my application. When you start an activity, the Foldable Toolbar has an advanced state with scrolling enabled and works normally. But now I have a requirement to show a full-screen error layout in case my API fails. In this case, I have to minimize the toolbar with the scroll effect lock.
An error button displays a redo button. In Retry, I call the API call again, and if the API succeeds, I have to expand the toolbar again and enable the scroll effect.
I managed to collapse the toolbar with setExpanded(flag, animation), but in this case I can’t block the scroll effect of the Collapsible Toolbar while the error layout is displayed.
I need to provide a way to lock, as well as unlock the scroll effect + Expand / collapse the toolbar. Any help could be helpful .. !!!
source
share