title: Expand/Collapse Lollipop toolbar animation (Telegram app)
body: <p>I'm trying to figure out how the expand/collapse animation of the toolbar is done. If you have a look at the Telegram app settings, you will see that there is a listview and the toolbar. When you scroll down, the toolbar collapse, and when you scroll up it expands. There is also the animation of the profile pic and the FAB. Does anyone have any clue on that? Do you think they built all the animations on top of it? Maybe I'm missing something from the new APIs or the support library.</p>
  
  <p>I noticed the same behaviour on the Google calendar app, when you open the Spinner (I don't think it's a spinner, but it looks like): The toolbar expands and when you scroll up, it collapse. </p>
  
  <p>Just to clearify: I don't need the QuickReturn method. I know that probably Telegram app is using something similar. The exact method that I need is the Google Calendar app effect. I've tried with </p>
  
  <pre><code>android:animateLayoutChanges="true"
  </code></pre>
  
  <p>and the expand method works pretty well. But obviously, If I scroll up the ListView, the toolbar doesn't collapse.</p>
  
  <p>I've also thought about adding a <code>GestureListener</code> but I want to know if there are any APIs or simpler methods of achieving this. </p>
  
  <p>If there are none, I think I will go with the <code>GestureListener</code>. Hopefully to have a smooth effect of the Animation. </p>
  
  <p>Thanks!</p>