TopGit tracks liaohuqiu/android-Ultra-Pull-To-Refresh on GitHub. The project has 9.5k stars. Ultra Pull to Refresh for Android. Support all the views.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
The stable version: 1.0.11, https://oss.sonatype.org/content/repositories/releases, in gradle:
mavenCentral()
pom.xml, latest version:
<dependency>
<groupId>in.srain.cube</groupId>
<artifactId>ultra-ptr</artifactId>
<type>aar</type>
<!-- or apklib format, if you want -->
<!-- <type>apklib</type> -->
<version>1.0.11</version>
</dependency>
pom.xml, stable version:
<dependency>
<groupId>in.srain.cube</groupId>
<artifactId>ultra-ptr</artifactId>
<type>aar</type>
<!-- or apklib format, if you want -->
<!-- <type>apklib</type> -->
<version>1.0.11</version>
</dependency>
gradle, latest version:
compile 'in.srain.cube:ultra-ptr:1.0.11'
gradle, stable version:
compile 'in.srain.cube:ultra-ptr:1.0.11'
Config
There are 6 properties:
Resistence
This is the resistence while you are moving the frame, default is: 1.7f.
Ratio of the Height of the Header to Refresh
The ratio of the height of the header to trigger refresh, default is: 1.2f.
Duration to Close
The duration for moving from the position you relase the view to the height of header, default is 200ms.
// the following are default settings
mPtrFrame.setResistance(1.7f);
mPtrFrame.setRatioOfHeaderHeightToRefresh(1.2f);
mPtrFrame.setDurationToClose(200);
mPtrFrame.setDurationToCloseHeader(1000);
// default is false
mPtrFrame.setPullToRefresh(false);
// default is true
mPtrFrame.setKeepHeaderWhenRefresh(true);
Other Config
setPinContent. Pin the content, only the HeaderView will be moved.
This's the the performance of material style in support package v19.
StoreHouse Style
Config using string:
// header
final StoreHouseHeader header = new StoreHouseHeader(getContext());
header.setPadding(0, LocalDisplay.dp2px(15), 0, 0);
/**
* using a string, support: A-Z 0-9 - .
* you can add more letters by {@link in.srain.cube.views.ptr.header.StoreHousePath#addChar}
*/
header.initWithString('Alibaba');
There is a PtrHandler, by which you can refresh the data.
public interface PtrHandler {
/**
* Check can do refresh or not. For example the content is empty or the first child is in view.
* <p/>
* {@link in.srain.cube.views.ptr.PtrDefaultHandler#checkContentCanBePulledDown}
*/
public boolean checkCanDoRefresh(final PtrFrameLayout frame, final View content, final View header);
/**
* When refresh begin
*
* @param frame
*/
public void onRefreshBegin(final PtrFrameLayout frame);
}
You can add a PtrUIHandler to PtrFrameLayout to implement any UI effect you want.
public interface PtrUIHandler {
/**
* When the content view has reached top and refresh has been completed, view will be reset.
*
* @param frame
*/
public void onUIReset(PtrFrameLayout frame);
/**
* prepare for loading
*
* @param frame
*/
public void onUIRefreshPrepare(PtrFrameLayout frame);
/**
* perform refreshing UI
*/
public void onUIRefreshBegin(PtrFrameLayout frame);
/**
* perform UI after refresh
*/
public void onUIRefreshComplete(PtrFrameLayout frame);
public void onUIPositionChange(PtrFrameLayout frame, boolean isUnderTouch, byte status, int oldPosition, int currentPosition, float oldPercent, float currentPercent);
}
Q & A
work with ViewPager: disableWhenHorizontalMove()
work with LongPressed, setInterceptEventWhileWorking()
Contact & Help
Please fell free to contact me if there is any problem when using the library.
Does liaohuqiu/android-Ultra-Pull-To-Refresh have any tags?
TopGit's last sync did not record any GitHub topics for liaohuqiu/android-Ultra-Pull-To-Refresh. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on liaohuqiu/android-Ultra-Pull-To-Refresh?
The most recent commit recorded on liaohuqiu/android-Ultra-Pull-To-Refresh was 3.5 years ago, based on the GitHub push timestamp. The repository has 2.6k forks — one of the better signals of community interest.
How many stars does liaohuqiu/android-Ultra-Pull-To-Refresh have?
liaohuqiu/android-Ultra-Pull-To-Refresh has 9.5k GitHub stars — refresh the page for the live number, or check github.com/liaohuqiu/android-Ultra-Pull-To-Refresh. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What is liaohuqiu/android-Ultra-Pull-To-Refresh?
liaohuqiu/android-Ultra-Pull-To-Refresh (liaohuqiu/android-Ultra-Pull-To-Refresh) is a Java project on GitHub. From the project's own README: Ultra Pull to Refresh for Android. Support all the views.
What language is liaohuqiu/android-Ultra-Pull-To-Refresh written in?
liaohuqiu/android-Ultra-Pull-To-Refresh is written primarily in Java. GitHub's language field is based on the largest share of bytes in the default branch.
Read full README in the tab above.
Want a second opinion on android-Ultra-Pull-To-Refresh?
Ask an AI that can read this page — one click and you get its take on android-Ultra-Pull-To-Refresh.