by chrisjenx

chrisjenx /Paralloid

Paralloid - (Pah-rah-loid) The Android Parallax library - DEPRECATED.

447 Stars 91 Forks Last release: Not found Apache License 2.0 77 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Paralloid - DEPRECATED

DEPRECATED - Use the project for more of guide and ideas how to apply parallax techniques. I will not support this library anymore.

Paralloid - (Pah-rah-loid) The Android Parallax library

Compatible back to API 7

An example application, Paralloid Library Example, can be downloaded from the Play Store.

ParallaxScrollView is dead..

I originally wrote ParallaxScrollView a while back as proof of concept, people took surprisingly well to it; but from the get-go it was a fundamentally flawed.

Tightly-coupled and inflexible, made it difficult to maintain and confusing for people to use.


Currently limited but will expand when requests.

  • Parallax another view when the parent scrolls.
  • Parallax multiple backgrounds.
  • Transformers, Parallax in different ways and directions


  • ListView
  • ScrollView
  • HorizontalScrollView


Paralloid is designed to be modular and very loosely coupled (to an extent).

Two high level modules exist

  • paralloid
    - which is the library which everything extends from.
  • paralloidviews
    - which extends the library with a couple of pre-extended ScrollableViews.
  • paralloidexamples
    - which is of course the examples App.

Generally use

as it contains everything you need to get going.

Getting Started


Currently I only support Gradle


Temporary steps from @therealkris.

  • First, I cloned the library into
  • In my
    , I added include
  • In my
    , I added
    compile project(':libs:paralloid:paralloid')
  • In
    , I removed the
    uploadArchives {}
  • In
    , I removed the
    uploadArchives {}
    block AND changed the dependency to read:
    compile project(':libs:paralloid:paralloid')
    instead of
    compile project(':paralloid')

Or Repository (coming soon):

dependencies {
    compile ''



This is an example, please refer to the

App for full code.

< android:id="@+id/scroll_view" android:layout_width="match_parent" android:layout_height="match_parent" android:fillviewport="true">

<linearlayout android:id="@+id/scroll_content" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingtop="192dp"></linearlayout>



Inside your

FrameLayout topContent = (FrameLayout) rootView.findViewById(;
ScrollView scrollView = (ScrollView) rootView.findViewById(;
if (scrollView instanceof Parallaxor) {
        ((Parallaxor) scrollView).parallaxViewBy(topContent, 0.5f);
// TODO: add content to top/scroll content

Thats it!

Have a look at the

interface for applicable Parallax methods.

Custom Views

I tried to keep this as simple as possible, you can nearly copy and paste this.

  • Extend the Scrollable view (or the one you allready have).
  • Implement the
  • Job done! See below for an example

Example implementation:

public class MyScrollView extends ScrollView implements Parallaxor {
  ParallaxViewController mParallaxViewController;

// Call init() in constructors private void init() { mParallaxViewController = ParallaxViewController.wrap(this); }

@Override protected void onScrollChanged(int l, int t, int oldl, int oldt) { super.onScrollChanged(l, t, oldl, oldt); mParallaxViewController.onScrollChanged(this, l, t, oldl, oldt); }

// region Implementation of Parallaxor

@Override public void parallaxViewBy(View view, float multiplier) { mParallaxViewController.parallaxViewBy(view, multiplier); }

@Override public void parallaxViewBy(View view, Transformer transformer, float multiplier) { mParallaxViewController.parallaxViewBy(view, transformer, multiplier); }

@Override public void parallaxViewBackgroundBy(View view, Drawable drawable, float multiplier) { mParallaxViewController.parallaxViewBackgroundBy(view, drawable, multiplier); }

// endregion }

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.