I have an AppBar and a horizontal linearlayout (which includes an edit text and two imagebuttons) and other things in my layout. When user scrolls down,
AppBar
You need to structure your layout like this:
Complete tutorial at: http://blog.grafixartist.com/toolbar-animation-with-android-design-support-library/