Giter Site home page Giter Site logo

bouncescroller's Introduction

Bounce Scroller

===== Bounce Scroller is a library for Android platform which provides iOS like bounce scroller effect and can also be used as pull-to-refresh.

Features

  • Support all ViewGroups and almost all Views(except self scrollable TextView);
  • Bounce can add with both header and footer to be pull-to-refresh feature;
  • No need to specify customer wrappers, ONLY one container to finish all bounces;

Usage

Just as below code, only need to make BounceScroller as the wrapper.

<me.dawson.bounce.BounceScroller xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/pc_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/blue" >

    <TextView
        android:id="@+id/tv_info"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/grey_4"
        android:gravity="center"
        android:text="@string/app_name"
        android:textColor="@color/white" />

</me.dawson.bounce.BounceScroller>

Set scroller features

// get scroller view
scroller = (BounceScroller) findViewById(R.id.pc_root);

// set bounce listener
scroller.setListener(bounceListener);

// set if header can bounce
scroller.ifHeaderBounce(true);

// set if footer can bounce
scroller.ifFooterBounce(true);

// set header view
scroller.setHeaderView(header);

// set footer view
scroller.setFooterView(footer);

// set recover content interpolator
scroller.setInterpolator(interpolator);

demo APK

Download APK

demo GIF

===

Any further question?

email me please!

bouncescroller's People

Watchers

James Cloos avatar 尚晓东 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.