0

I am writing an application where need to implement Google Play Store Scrolling implementation. There are sample library available to implement it, like

  1. https://github.com/nirhart/ParallaxScroll
  2. https://github.com/chrisjenx/Paralloid

additional I need to implement some extra effect here.

enter image description here So like mention here there are three View available in screen. (Image A)

  1. View A: Top Bar, will be of fix height
  2. View B: Fix size block that will contain some text information.
  3. View C: Scroll View (Expandable)

Here all I need same Parallax effect(like supported library),

  1. but instead to scroll completely(View A, B, C) I just wanted to scroll till View-A not gone from picture.(Image B)
  2. and then it should allow to scroll only View C which is list. Means now View B should remain on same position, until start scroll back down (with view A)(Image 3).

Any suggestion here ?

EDIT: Update on work I have done I am able to achieve some how this using kmshack solution but with little bit hack. Since scrolling only allow when list view have enough child to scroll so I have added some empty view and manage in Adapter.getView.

But this is not complete solution, since there are possibility that application List will not have any item to show and here also scrolling should work. Is there any way to make it possible without adding fake child?

CoDe
  • 11,056
  • 14
  • 90
  • 197
  • see: http://gist.github.com/pskink/d7089e5a82c970917be1 and sample implementation: http://gist.github.com/pskink/d7f0673b77fe8537b270 – pskink May 18 '15 at 13:04

1 Answers1

2

There's many ways to do this, but basically: in your main scrollable view, leave 2 spaces for A and B but have them outside of the scrollable view, then listen to the scroll events and translate and/or transform A and B correspondingly.

The same applies to any kind of parallax effect, you simply translate in a "non linear" way giving the illusion of depth.

For some examples you can check out this G+ post by Roman Nurik.

A few tricks:

Takhion
  • 2,706
  • 24
  • 30
  • Thanks Takhion for consideration...Let me check if it could help. – CoDe Dec 29 '14 at 03:26
  • I did not able to make it..could you please share any example for same and any way giving you your reward. thanks :) – CoDe Dec 30 '14 at 05:53
  • Hey @Shubh, if you look at [this G+ post from Roman Nurik](https://plus.google.com/+RomanNurik/posts/1Sb549FvpJt) you'll probably learn enough that you can achieve any "scrolling trick" you want :) – Takhion Dec 31 '14 at 12:52