9

I'm trying to reproduce the effect of both versions of the Google I/O 2014 app, the first release one that fade while scrolling, and the updated one that stretch when gets near the toolbar

Google I/O Toolbar

I downloaded the source of the app but this effect ins't on the public source, so i'm trying to find out how to do it by self

What i already did was create a custom view, which animate the translationY from actionbarHeight to 0, and vice-versa, but it don't looks the best approach, does anyone know a better approach?

Yuri Heupa
  • 1,159
  • 3
  • 10
  • 32
  • Check out this [link](http://cyrilmottier.com/2013/05/24/pushing-the-actionbar-to-the-next-level/) it shows you how to achieve the first effect. For the second one you could try [this library](https://github.com/ksoichiro/Android-ObservableScrollView), it's open source so I guess you can look through the code. – Gent Ahmeti Jan 23 '15 at 13:15
  • The first effect is different than one the link, the fading while scrolling is easy to do, when applying only to the toolbar, the problem is to apply the alpha effect to the top of the screen to the bottom of the title container. I'm checking this library right now, looks the first effect on the github effect matches the first effect i'm talking about, but i'm still trying to find how to reproduce the second effect – Yuri Heupa Jan 23 '15 at 13:19

1 Answers1

2

You can use the new design library.

Here is some examples:

https://github.com/liuguangqiang/AndroidDesignSupportSample