Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

πŸ”₯ A custom view pull to refresh,support ScrollView,ListView,RecyclerView,WebView and all another views, easy to use

Notifications You must be signed in to change notification settings

jiangsutong/SpringView

Repository files navigation

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

SpringView support AppBarLayout

θΏ™ι‡Œε†™ε›Ύη‰‡ζθΏ° θΏ™ι‡Œε†™ε›Ύη‰‡ζθΏ° θΏ™ι‡Œε†™ε›Ύη‰‡ζθΏ° θΏ™ι‡Œε†™ε›Ύη‰‡ζθΏ° θΏ™ι‡Œε†™ε›Ύη‰‡ζθΏ° θΏ™ι‡Œε†™ε›Ύη‰‡ζθΏ° θΏ™ι‡Œε†™ε›Ύη‰‡ζθΏ°

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 RecyclerView ScrollView or others
 android:layout_width="match_parent"
 android:layout_height="match_parent"/>
 </com.liaoinstan.springview.widget.SpringView>

Of course, you can also add the header/footer in java code:

	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.4.0'
}

or Maven:

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

Update log

####v1.4.0

  • new function setMovePara(),a new header for weixin:WeixinHeader,a new type DRAG like SwipeRefreshLayout:spring.setType(Type.DRAG)

####v1.3.3

  • Optimize several experiential issues,Added onFinishFreshAndLoadDelay(int delay), callFreshDelay(int delay) method,Optimizing performance with BottomSheetBehavior,Optimize the performance used in BottomSheetDialog

####v1.3.2

  • fix the bug of the linkage damping of AppBarLayout in the case of null data, new setEnableFooter(Boolean), setEnableHeader(Boolean) disable or enable header/footer.

####v1.3.0

  • support AppBarLayout,fix sliding conflict

####v1.2.7

  • bug fix

####v1.2.6

  • padding bug fix

####v1.2.5

  • add setEnable(boolean) function

####v1.2.4

  • add callFresh() method, used to call the refresh operation manual
  • fixes the lateral sliding conflict

####v1.2.2

  • repair the callback refresh many times

####v1.2.1

  • repair the click event occasional failure problem

Feedback

If there are any questions or Suggestions, please feedback to my email: liaoinstan@outlook.com Or in my blog

If it works to you, please give me a star for my hardwork ,thank you

More

More, please visit:my CSDN blog

About

πŸ”₯ A custom view pull to refresh,support ScrollView,ListView,RecyclerView,WebView and all another views, easy to use

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /