I think this blog post has what you are looking for. It offers guidance for creating a layout like this (although you may have to add code to color the application bar).
The great idea of ββsuch a βlayoutβ is to implement a ScrollView with some kind of onScrollChanged listener. The goal is to make your Activity available to change the scroll, and then transform the necessary elements.
Once you know about the scroll position (and changes), you can use this value as a base for applying color conversion (for the ActionBar background) and for scaling the title text.
Hope this helps.
source share