Giter VIP home page Giter VIP logo

springview's Introduction

More, please visit:My CSDN     apk demo:download     中文文档:中文文档

SpringView

SpringView is one provides the function of the upper and lower drag and drop components, can be highly customized, implement all kinds of drop-down \ pull painting effect, implementation in the demo: imitation ali travel, imitation Meituan, imitation QQ drop-down brush red envelopes, imitation acfun etc., is fully compatible with the source control such as ListView, RecyclerView, ScrollView, WebView, etc., using a simple, easily customize their style of drag and drop page 这里写图片描述 SpringView Individual independence will head/foot, almost achieve the effect of whatever you want, just need to inherit BaseHeader (or Footer) to implement the interface

SpringView Can dynamically replace the head/tail, you just need to set up different Footer:springView.setHeader(MyHeader());

SpringView Multi-touch support, can two hands drag and drop in a row, you can customize some interesting results

SpringView Provides two methods for drag and drop (overlap and follow), can be dynamically switching

SpringView For lazy people don't want to go to the custom head/tail provides 7 kinds of the default implementation (mimics the ali, tencent, Meituan etc. Various style) as follows, will continue to increase    

这里写图片描述 这里写图片描述 这里写图片描述 这里写图片描述 这里写图片描述 这里写图片描述 这里写图片描述

How to use SpringView

Add Spring View in the layout file, note that Spring View and ScrollView have the same limitation: only one child element:

	<com.liaoinstan.springview.widget.SpringView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:header="@layout/myheader"
            app:footer="@layout/myfooter">

            <listView
                android:layout_width="match_parent"
                android:layout_height="match_parent"/>

     </com.liaoinstan.springview.widget.SpringView>

Of course, you also can not in the layout setting, use the code dynamically added:

	springView.setHeader(new DefaultHeader(this));
	springView.setFooter(new DefaultFooter(this));

Add Listener

If you need to deal with the case, just add a listener in code:

springView.setListener(new SpringView.OnFreshListener() {
      @Override
      public void onRefresh() {
      }
      @Override
      public void onLoadmore() {
      }
});

Get SpringView

use Gradle:

dependencies {
   compile 'com.liaoinstan.springview:library:1.2.1'
}

or Maven:

<dependency>
  <groupId>com.liaoinstan.springview</groupId>
  <artifactId>library</artifactId>
  <version>1.2.1</version>
  <type>pom</type>
</dependency>

Feedback

If there are any questions or Suggestions, please feedback to my email: [email protected] Or in my blog

If it works for you, click the stars for my hardwork ,thank you

More

More, please visit:my CSDN blog

springview's People

Contributors

liaoinstan avatar

Watchers

 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.