Answer the question
In order to leave comments, you need to log in
How to make actionbar transparent?
In my application, there is a main activity in which fragments change when you click on the bottom panel with icons (like on Instagram). By design, I need that when one of the ActionBar fragments is turned on, it becomes transparent (and at the same time the title and logo disappear) and only the context menu button remains. I tried everything I could find on stackoverflow, but I couldn't make the actionbar transparent. No amount of setting transparency or importing an alternate view for the actionbar does the job. Only getactionbar().hide fires. but this method hides the actionbar along with the menu button, which is what I need. Someone share an adequate working code for setting transparency while maintaining the menu button (three dots which).
Answer the question
In order to leave comments, you need to log in
I figured it out somehow, but I don't remember the details. It seems that there it was necessary to twist not only the ActionBar, but also the Toolbar that it has inside. And there were some other tricks about the fact that some properties could only be set through ThemeOverlay.
You can put the ActionBar in CollapsingToolbarLayout and do collapsingToolbar.setContentScrimColor(Color.TRANSPARENT)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question