Last active
August 14, 2019 13:58
-
-
Save chandruscm/03756a5ca3ba520d828615453de414d4 to your computer and use it in GitHub Desktop.
activity_menu_app_bar_1.xml produces the desired effect, but the toolbar moves up: as per the height set in the empty CollapsingToolbarLayout before adding the elevation. activity_menu_app_bar_2.xml does not work, it adds elevation by default without scrolling.
Say, why does AppBarLayout have a default stateListAnimator ? When does it ever get changed? Which states does it have, by default?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason, it works only when I place the
Space
above theToolbar
and that again moves theToolbar
. Placing theSpace
below theToolbar
does not set any elevation at all. I tested it on a device and the emulator, both on API 25.I enabled
layout bounds
and I noticed theSpace
wasn't collapsing, it stays at the bottom. I also tried wrapping theToolbar
andSpace
in a vertical linear layout and tried using a plainView
instead ofSpace
. But no luck :(