0

A picture may tells what I want: I donnt have enough Reputation so please check this link. http://ww3.sinaimg.cn/large/005yyi5Jjw1ej4gsxduwej31h70h245u.jpg When you scroll the list up, the image will scroll up in different speed in the background too. Play store and Google I/O 2014 app have this effect. use a recyclerView and custom layout manager? Thanks! Sorry for my poor English.

2 Answers2

0

Probably you have already noticed, but source code for I/O app had been released. https://github.com/google/iosched

yshrsmz
  • 1,179
  • 2
  • 15
  • 33
0

See this article: http://flavienlaurent.com/blog/2013/11/20/making-your-action-bar-not-boring/

and this answer: Is there an addHeaderView equivalent for RecyclerView?

It is using setTranslationY, but you can similarly use setHeight like on the image you provided.

The hand (and the space above his head) disappears gradually because the height changes and the image in the ImageView is centerCrop. I'm not sure if this is the exact code, but looks close enough: https://github.com/google/iosched/blob/master/android/src/main/res/layout/activity_session_detail.xml#L43

Community
  • 1
  • 1
TWiStErRob
  • 44,762
  • 26
  • 170
  • 254