captainbupt / android-Ultra-Pull-To-Refresh-With-Load-More

Added Load More to Ultra Pull to Refresh for Android. Support all the views.
MIT License
422 stars 104 forks source link

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

Open xuehuashi opened 7 years ago

xuehuashi commented 7 years ago

。。。。 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()方法在哪里调用,如何用

captainbupt commented 6 years ago

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