Google+ profile like scrolling Effect

2019-01-30 17:00发布

问题:

I'm working on Google plus android app and wondering how did they achieve scrolling effect in profile view, I searched through out web for 2 days and didn't find any tutorial on this, anybody do not know what i'm talking about can view the screenshots I've taken on my Nexus 7.

Now my curiosity is in knowing how to achieve this effect, anyone who have idea please guide me.

回答1:

---OLD INFO----

You can also achieve this effect by using the Android-ParallaxHeaderViewPager a good example of scrolling tab header by kmshack Github page

The Sample code is give in this Here Git Hub link

The explanation for the solution is begin described in the github page

NEW UPADTE 25-4-2015

A new Library works with app compact and tool bar Andriod-Seamless-ViewPager-Header

And there is another example also avilable PlayNewsStandDemo

Check this PlayNewsStandDemo

Hope this will help you



回答2:

The top is called a parallax effect, where the background image scrolls at half the speed of the actual scroll.

There is a good library you can use for that called Paralloid:

https://github.com/chrisjenx/Paralloid

The other part is the sticky tabs, which can be implemented using StickyListHeaders:

https://github.com/emilsjolander/StickyListHeaders



回答3:

You can achieve that using something we like to call "Parallax Effect". I've made an easy to use library that can be used to get that effect.

If you want to use it on a RecyclerView you can use this library: https://github.com/kanytu/android-parallax-recyclerview

If you can use lists like ListView, ScrollView etc you can use this one: https://github.com/kanytu/android-parallax-listview

I know this is a link only answer however such effect requires a lot of coding and therefor can't be posted as an answer.

Here are some screens of the effect you get:



回答4:

This is a good resource : http://antoine-merle.com/blog/2013/10/04/making-that-google-plus-profile-screen/ --Explains the sticky footer, parallax and view hierarchy.

If your looking for the late animation on scroll, have a look here :

google plus scrolling technique in android



回答5:

You can use CollapsingToolbarLayout provided by google design library. The following link provides a detailed explanation how to achieve what you want

http://inthecheesefactory.com/blog/android-design-support-library-codelab/en