Google+ profile like scrolling Effect

2019-01-30 16:21发布

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.View the GIF

5条回答
Emotional °昔
2楼-- · 2019-01-30 16:59

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楼-- · 2019-01-30 17:03

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:

enter image description hereenter image description here

查看更多
聊天终结者
4楼-- · 2019-01-30 17:05

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楼-- · 2019-01-30 17:07

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

查看更多
狗以群分
6楼-- · 2019-01-30 17:14

---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

enter image description here

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

Andriod-Seamless-ViewPager

And there is another example also avilable PlayNewsStandDemo

Check this PlayNewsStandDemo

PlayNewsStandDemo

Hope this will help you

查看更多
登录 后发表回答