last day (15 days later) » 

10:24 PM
0
A: Android CoordinatorLayout shows duplicated App Bar

weibeldLooks like the default ActionBar is still there even though you have added a Toolbar. Make sure to set on of the following themes android:theme="@style/Theme.AppCompat.NoActionBar" android:theme="@style/Theme.AppCompat.Light.NoActionBar" android:theme="@style/Theme.AppCompat.DayNight.NoActionBar...

 
Yes. That makes sense. Yet, it doesn't work. The themes seem to only change both bar's background color, but they are still there.
Do you think getting the ActionBar View is possible? Maybe setting it's visibility to View.GONE works.
 
Anyway, why are you not using the CollapsingToolbarLayout around the Toolbar?
A reference to the ActionBar can be obtained in the Activity with getActionBar().
 
What do you mean "around the Toolbar"?
That's weird, getActionBar() and getSupportActionBar() both return null
 
As a child element of AppBarLayout and parent element of Toolbar.
 
I'm not quite sure I understand.
Hi, so stackoverflow made me make a chat room
anyway
can you explain further?
 
10:31 PM
The reason that getSupportActionBar() returns null is that you disabled the ActionBar but didn't set your Toolbar as the app bar. See the edit in my answer.
I guess you want a collapsing Toolbar that expands and collapses on scrolling like for example here antonioleiva.com/collapsing-toolbar-layout?
 
10:49 PM
okay, I'll try that
Yes, that's what I want
you know...
that actually works!!!
thank you!
Anyway now I have another problem
when the bar gets all the way to the top, there is an empty black line within it and the status bar (with the notifications and other things). How can I remove this?
 
11:30 PM
Great. About the black bar I'm not sure, because I can't replicate the example on my phone. But I would first try to find out if it has something to do with the status bar.
 

last day (15 days later) »