I tried to reply with Thomas, but he had a problem that as soon as the user scrolls, the application bar resets again and the problem reappears.
So, I came up with another solution that should make the transparent text of the collapsed title transparent when expanding the search area . This works great and does not depend on the state to minimize / expand the application panel and does not change it.
This is simple:
if (searchViewExpanding) { collapsingToolbarLayout.setCollapsedTitleTextColor(Color.TRANSPARENT); } else { collapsingToolbarLayout.setCollapsedTitleTextColor(Color.WHITE); }
Of course, you need to process the setOnActionExpandListener your search menu item to find out when it can be called.
source share