I've been thinking about this for a while but I can't seem to figure it out. I have a simple app quit 3 tabs (`TabLayout` + `ViewPager`) and I want to change the color of the `ToolBar` when I swipe the tabs. The effect I wanna achieve is to dynamically change the color as the user swipes to the next or previous tab.

[Check video here](https://www.dropbox.com/s/1khy6crd8xifjoq/Demo.mov?dl=0)

In the past I've been able to change the background of the `ViewPager`'s children views by assigning a color to each child view and the using `PageTransformer` to modify the alpha component which works fine, however, the `ToolBar` is not a child of the `ViewPager` therefore I can't set a color for each page since there's only one `ToolBar` at all times. 

Any idea on how can I achieve this?