Skip to content

Tag: toolbar

How to implement hiding the toolbar when scrolling WebView?

I have an Activity with WebView and my own AppBarLayout. I want to implement hiding/showing the AppBarLayout with animation when scrolling the WebView, like in the Google Chrome app. I tried different ways. ObservableWebView, but it doesn’t work correctly, it doesn’t always show AppBar, especially if the page is short. ConstraintLayout with animations. Something similar, but still not the same

SearchView icon shows twice

I’ve implemented SearchView inside my toolbar, following Android’s official instructions. SearchView works well itself, but when I tap the search icon, it is shifted to the left instead of showing the Search Hint and Close button, although if I click this “second Search” icon, finally I get the typical search view. Here is my xml of the toolbar: And my