slava-boichenko / android-parallax-listview

A parallax listview, scrollview and gridview with zoom support. Like Google Play Store

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

android-parallax-listview

Listeners:

//will be called on scroll. Returns the scroll progression percentage. from 0 to 1.0
ParallaxScrollListener{
   void onScroll(float percentage,float offset, View parallaxView);
}

Parameters:

 enableZoom - zooms view on scroll (will use zoomFactor)
 zoomFactor - zoom factor
 scrollMultiplier - scroll multiplier (0.5 recommended)

XML usage:

 <view
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.poliveira.apps.parallaxlistview.ParallaxListView"
        app:enableZoom="true"
        android:id="@+id/parallaxListview"
        app:zoomFactor="0.7"
        app:scrollMultiplier="0.5"
 />

Code usage

 parallaxView.setParallaxView(LayoutInflater.from(this).inflate(R.layout.myParallaxView, parallaxScrollView, false));

Output:

ParallaxListView ParallaxScrollView ParallaxGridView

About

A parallax listview, scrollview and gridview with zoom support. Like Google Play Store

License:Apache License 2.0


Languages

Language:Java 100.0%