Skip to content
This repository was archived by the owner on Feb 27, 2020. It is now read-only.
This repository was archived by the owner on Feb 27, 2020. It is now read-only.

onRefreshComplete不加延迟调用,无法回滚 #6

@zengbobo0805

Description

@zengbobo0805

@OverRide
public void onPullDownToRefresh(PullToRefreshBase refreshView) {
System.out.println("onPullDownToRefresh");
// Update the whole state, and forbidden touch
getInnerScroller().onRefresh(true);

// new Handler().postDelayed(new Runnable() {
// @OverRide
// public void run() {
// Return to normal state
getInnerScroller().onRefresh(false);
// Test code
switch (WelcomeActivity.demoType) {
case Pull_to_add_Magic_Header_Mixed:
case Pull_to_add_Magic_Header_Mixed_Complicated_header:
if (getActivity() instanceof DemoActivity) {
((DemoActivity) getActivity()).addRandomPic();
}
break;
case Pull_to_add_Inner_Header_Mixed:
addRandomPic();
break;
default:
// nothing
break;
}
if (getInnerScroller().getReceiveView() instanceof PullToRefreshBase) {
((PullToRefreshBase)getInnerScroller().getReceiveView()).onRefreshComplete();
}
//这个是注释的,不加延迟,调用onRefreshComplete不能reset;
// }
// }, 2000);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions