Android Open Source - ParallaxScroll Parallax List View






From Project

Back to project page ParallaxScroll.

License

The source code is released under:

MIT License

If you think the Android project ParallaxScroll listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.nirhart.parallaxscroll.views;
/*from w  w w .ja va  2 s. com*/
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ListView;

public class ParallaxListView extends ListView {

  private ParallaxListViewHelper helper;

  public ParallaxListView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    init(context, attrs);
  }

  public ParallaxListView(Context context, AttributeSet attrs) {
    super(context, attrs);
    init(context, attrs);
  }

  protected void init(Context context, AttributeSet attrs) {
    helper = new ParallaxListViewHelper(context, attrs, this);
    super.setOnScrollListener(helper);
  }

  @Override
  public void setOnScrollListener(OnScrollListener l) {
    helper.setOnScrollListener(l);
  }
  
  public void addParallaxedHeaderView(View v) {
    super.addHeaderView(v);
    helper.addParallaxedHeaderView(v);
  }

  public void addParallaxedHeaderView(View v, Object data, boolean isSelectable) {
    super.addHeaderView(v, data, isSelectable);
    helper.addParallaxedHeaderView(v, data, isSelectable);
  }
}




Java Source Code List

com.nirhart.parallaxscroll.views.ParallaxExpandableListView.java
com.nirhart.parallaxscroll.views.ParallaxListViewHelper.java
com.nirhart.parallaxscroll.views.ParallaxListView.java
com.nirhart.parallaxscroll.views.ParallaxScrollView.java
com.nirhart.parallaxscroll.views.ParallaxedView.java
com.nirhart.parallaxscrollexample.CustomExpandableListAdapter.java
com.nirhart.parallaxscrollexample.CustomListAdapter.java
com.nirhart.parallaxscrollexample.MainActivity.java
com.nirhart.parallaxscrollexample.MultipleParallaxExpandableListView.java
com.nirhart.parallaxscrollexample.MultipleParallaxListView.java
com.nirhart.parallaxscrollexample.MultipleParallaxScrollView.java
com.nirhart.parallaxscrollexample.SingleParallaxAlphaScrollView.java
com.nirhart.parallaxscrollexample.SingleParallaxExpandableListView.java
com.nirhart.parallaxscrollexample.SingleParallaxListView.java
com.nirhart.parallaxscrollexample.SingleParallaxScrollView.java