liaohuqiu/android-Ultra-Pull-To-Refresh — dự án mã nguồn mở — đang có 9.5k sao GitHub. Ultra Pull to Refresh for Android. Support all the views.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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.
liaohuqiu/android-Ultra-Pull-To-Refresh có bao nhiêu sao?
liaohuqiu/android-Ultra-Pull-To-Refresh có 9.5k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/liaohuqiu/android-Ultra-Pull-To-Refresh. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
liaohuqiu/android-Ultra-Pull-To-Refresh có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho liaohuqiu/android-Ultra-Pull-To-Refresh. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
liaohuqiu/android-Ultra-Pull-To-Refresh còn đang phát triển không?
Commit gần nhất trên liaohuqiu/android-Ultra-Pull-To-Refresh là 3.2 năm trước (theo timestamp GitHub). Repo có 2.6k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
liaohuqiu/android-Ultra-Pull-To-Refresh là gì?
liaohuqiu/android-Ultra-Pull-To-Refresh (liaohuqiu/android-Ultra-Pull-To-Refresh) là dự án Java trên GitHub. Theo mô tả gốc: Ultra Pull to Refresh for Android. Support all the views.
liaohuqiu/android-Ultra-Pull-To-Refresh viết bằng ngôn ngữ gì?
liaohuqiu/android-Ultra-Pull-To-Refresh chủ yếu viết bằng Java. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về android-Ultra-Pull-To-Refresh?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về android-Ultra-Pull-To-Refresh.