Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用setMode() 方法没有效果??demo中也没使用栗子,如何用? #51

Open
xuehuashi opened this issue Nov 6, 2017 · 1 comment

Comments

@xuehuashi
Copy link

。。。。
recycleViewAdapter = new ArtRecycleViewAdapter(this);
recycleView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
recycleView.addItemDecoration(new DividerItemDecoration(this));
recycleView.setAdapter(recycleViewAdapter);
mPtrFrame.setPtrHandler(new PtrDefaultHandler() {
@OverRide
public void onRefreshBegin(PtrFrameLayout frame) {
page=1;
isRefresh=true;
hasMore = true;
loadData(page, mode, "0", deviceId, "0");
}
});
mPtrFrame.setMode(PtrFrameLayout.Mode.REFRESH); //setmode()????
mPtrFrame.setOffsetToRefresh(200);
mPtrFrame.autoRefresh(true);
CustomPtrHeader header = new CustomPtrHeader(this,mode);
mPtrFrame.setHeaderView(header);
mPtrFrame.addPtrUIHandler(header);
。。。
setMode()方法在哪里调用,如何用

@xuehuashi xuehuashi changed the title setMode() 方法没有用??demo中也没使用栗子,如何用? 使用setMode() 方法没有效果??demo中也没使用栗子,如何用? Nov 6, 2017
@captainbupt
Copy link
Owner

没有效果是什么意思? setMode是用来定义是否需要上拉或者下拉的。比如调用mPtrFrame.setMode(PtrFrameLayout.Mode.REFRESH);就无法上拉加载更多,只能下拉刷新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants