lcodecorex / TwinklingRefreshLayout

RefreshLayout that support for OverScroll and better than iOS. 支持下拉刷新和上拉加载的RefreshLayout,自带越界回弹效果,支持RecyclerView,AbsListView,ScrollView,WebView
Apache License 2.0
4k stars 673 forks source link

下拉刷新没有延迟,直接加载完毕,是我设置的问题吗 #110

Open zb666 opened 7 years ago

zb666 commented 7 years ago

refreshlayout.setMaxHeadHeight(50); SinaRefreshView sinaRefreshView = new SinaRefreshView(this); sinaRefreshView.setArrowResource(R.drawable.ic_arrow); sinaRefreshView.setTextColor(0xff745D5C); refreshlayout.setHeaderView(sinaRefreshView);

@Override public void onRefresh(final TwinklingRefreshLayout refreshLayout) { //super.onRefresh(refreshLayout); new Handler().postDelayed(new Runnable() { @Override public void run() { //这里可以请求网络 然后记得要先清空clear原先的集合 再加入数据 Toast.makeText(getApplicationContext(),"下拉刷新", Toast.LENGTH_SHORT).show(); refreshLayout.finishRefreshing(); //完成刷新 } },2000); }

zb666 commented 7 years ago

finished,我设置了最大下拉高度,这样直接导致了没有触发下拉的边界,导致整个下拉回调无法正常走完