Search code examples
androidandroid-snackbar

How to move a view above Snackbar just like FloatingButton


I got a linear layout that I want to move up when a Snackbar appears.

I saw many examples how to do this with FloatingButton, but what about a regular view?


Solution

  • You need to add a behaviour to your LinearLayout and embed it in a CoordinatorLayout. You might want to read this: http://alisonhuang-blog.logdown.com/posts/290009-design-support-library-coordinator-layout-and-behavior