I don't know if this was asked before, but `toolba...
# anko
a
I don't know if this was asked before, but
toolbar
in my app is swipeable away. I'm using it like this:
Copy code
coordinatorLayout {
    appBarLayout {
        toolbar { ... }
        relativeLayout { to be filled with content later }
    }
}
Is there any way to prevent this behaviour? I tried
setCollapsible(false)
to no avail
m
The only fix for me was using XML layout for appBarLayout/toolbar.
a
bummer! that's a real stopper for me 😞
d
And do you need coordinator/appbarLayout if you dont want to use collapsing?
a
point, thank you. How should my layout look like then? I just wasn't aware of options, and appBarLayout itself surprisingly didn't show the toolbar
I mean, I can live without collapsible toolbar, but a collapsible toolbar you can't make appear again feels bad for me.
ok, I found a quick and dirty workaround: added
Copy code
scrollFlags = AppBarLayout.LayoutParams.SCROLL_FLAG_EXIT_UNTIL_COLLAPSED
in toolbar's lparams (toolbar is inside
appBarLayout
which in turn is inside
coordinatorLayout
)