Home

Awesome

Parallax Everywhere#

Android Arsenal

Parallax everywhere (PEW) is a library with alternative android views using parallax effects.

Demo

You can try the demo app on google play.

https://play.google.com/store/apps/details?id=com.fmsirvent.ParallaxEverywhereSample

Views with effect?

Android viewPEW view
ImageViewPEWImageView
TextViewPEWTextView

How it works?

Show me the code

Gradle dependencies:

compile 'com.fmsirvent:parallaxeverywhere:1.0.4'

Code in layout:

  <!-- add on top parent layout: xmlns:pew="http://schemas.android.com/apk/res-auto" -->


   <FrameLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:layout_margin="10dp"
        android:layout_weight="1">

        <com.fmsirvent.ParallaxEverywhere.PEWImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:layout_margin="10dp"
            android:scaleType="centerCrop"
            android:src="@drawable/alicante_explanada" />

        <com.fmsirvent.ParallaxEverywhere.PEWTextView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="10dp"
            android:gravity="bottom|center_horizontal"
            android:text="@string/alicante_explanada"
            android:textColor="@android:color/white"
            pew:block_parallax_x="true"
            pew:parallax_x="160dp"
            pew:parallax_y="160dp"
            pew:reverse="reverseY" />

    </FrameLayout>

Proguard:

-dontwarn com.fmsirvent.ParallaxEverywhere.**

Attributes

All PEW

Only: no image PEW

License

ParallaxEverywhere is available under the MIT license. See the LICENSE file for more info.