本文整理了Java中android.support.v4.widget.SwipeRefreshLayout.isRefreshing()
方法的一些代码示例,展示了SwipeRefreshLayout.isRefreshing()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SwipeRefreshLayout.isRefreshing()
方法的具体详情如下:
包路径:android.support.v4.widget.SwipeRefreshLayout
类名称:SwipeRefreshLayout
方法名:isRefreshing
暂无
代码示例来源:origin: Rukey7/MvpApp
/**
* 控制刷新
* @param refreshLayout
* @param isRefresh
*/
public static void controlRefresh(SwipeRefreshLayout refreshLayout, boolean isRefresh) {
if (refreshLayout != null) {
if (isRefresh != refreshLayout.isRefreshing()) {
refreshLayout.setRefreshing(isRefresh);
}
}
}
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
public void finishTask() {
mIsRefreshing = false;
loadMoreView.setVisibility(View.GONE);
if (mSwipeRefreshLayout.isRefreshing()) {
mSwipeRefreshLayout.setRefreshing(false);
}
if (pageNum * pageSize - pageSize - 1 > 0) {
mAdapter.notifyItemRangeChanged(pageNum * pageSize - pageSize - 1, pageSize);
} else {
mAdapter.notifyDataSetChanged();
}
}
代码示例来源:origin: square/assertj-android
public SwipeRefreshLayoutAssert isRefreshing() {
isNotNull();
assertThat(actual.isRefreshing()) //
.overridingErrorMessage("Expected to be refreshing but was not.") //
.isTrue();
return this;
}
代码示例来源:origin: square/assertj-android
public SwipeRefreshLayoutAssert isNotRefreshing() {
isNotNull();
assertThat(actual.isRefreshing()) //
.overridingErrorMessage("Expected to not be refreshing but was.") //
.isFalse();
return this;
}
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
int lastVisibleItemPosition = linearLayoutManager.findLastVisibleItemPosition();
if (lastVisibleItemPosition + 1 == mAdapter.getItemCount()) { // 滑到倒数第二项就加载更多
boolean isRefreshing = refreshLayout.isRefreshing();
if (isRefreshing) {
mAdapter.notifyItemRemoved(mAdapter.getItemCount());
return;
}
mPresenter.getBooksByTag(tag, current + "", "10");
}
}
}
代码示例来源:origin: TheFinestArtist/FinestWebView-Android
@Override
public void onProgressChanged(WebView view, int progress) {
BroadCastManager.onProgressChanged(FinestWebViewActivity.this, key, progress);
if (showSwipeRefreshLayout) {
if (swipeRefreshLayout.isRefreshing() && progress == 100) {
swipeRefreshLayout.post(new Runnable() {
@Override
public void run() {
swipeRefreshLayout.setRefreshing(false);
}
});
}
if (!swipeRefreshLayout.isRefreshing() && progress != 100) {
swipeRefreshLayout.post(new Runnable() {
@Override
public void run() {
swipeRefreshLayout.setRefreshing(true);
}
});
}
}
if (progress == 100) {
progress = 0;
}
progressBar.setProgress(progress);
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
public void loadData() {
RetrofitHelper.getBiliAPI()
.getActivityCenterList(pageNum, pageSize)
.compose(bindToLifecycle())
.delay(1000, TimeUnit.MILLISECONDS)
.map(ActivityCenterInfo::getList)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnNext(listBeans -> {
if (listBeans.size() < pageSize) {
loadMoreView.setVisibility(View.GONE);
mHeaderViewRecyclerAdapter.removeFootView();
}
})
.subscribe(listBeans -> {
activityCenters.addAll(listBeans);
finishTask();
}, throwable -> {
if (mSwipeRefreshLayout.isRefreshing()) {
mSwipeRefreshLayout.setRefreshing(false);
}
loadMoreView.setVisibility(View.GONE);
ToastUtil.ShortToast("加载失败啦,请重新加载~");
});
}
代码示例来源:origin: jdsjlzx/LRecyclerView
if(activity.mSwipeRefreshLayout.isRefreshing()){
activity.mDataAdapter.clear();
mCurrentCounter = 0;
if(mSwipeRefreshLayout.isRefreshing()){
activity.mSwipeRefreshLayout.setRefreshing(false);
break;
case -3:
if(mSwipeRefreshLayout.isRefreshing()){
activity.mSwipeRefreshLayout.setRefreshing(false);
activity.mRecyclerView.refreshComplete(REQUEST_COUNT);
代码示例来源:origin: liuyanggithub/SuperMvp
public void showRefreshLayout() {
if (!swipe_refresh_layout.isRefreshing()) {
// RxSwipeRefreshLayout.refreshing(swipe_refresh_layout).accept(true);
swipe_refresh_layout.setRefreshing(true);
}
}
代码示例来源:origin: jinguangyue/Android-CustomCamera
@Override
public void run() {
if (swipeRefreshLayout.isRefreshing()) {
swipeRefreshLayout.setRefreshing(false);
}
}
});
代码示例来源:origin: z3896823/PanelList
@Override
public void onRefresh() {
Toast.makeText(context, "请调用PanelListAdapter的setOnRefreshListener()并传入你的Listener", Toast.LENGTH_SHORT).show();
if (swipeRefreshLayout.isRefreshing()) {
swipeRefreshLayout.setRefreshing(false);
}
}
}
代码示例来源:origin: HelloChenJinJun/TestChat
@Override
public void hideLoading() {
// isLoading = false;
if (refresh.isRefreshing()) {
refresh.setRefreshing(false);
}
super.hideLoading();
}
代码示例来源:origin: HelloChenJinJun/TestChat
@Override
public void hideLoading() {
if (refresh.isRefreshing()) {
refresh.setRefreshing(false);
}
super.hideLoading();
}
}
代码示例来源:origin: HelloChenJinJun/TestChat
@Override
public void hideLoading() {
if (refresh.isRefreshing()) {
refresh.setRefreshing(false);
}
super.hideLoading();
}
代码示例来源:origin: huangfangyi/YiChat
@Override
public void onRefresh() {
boolean isRefreshing = swipeRefreshLayout.isRefreshing();
if (isRefreshing) {
refreshDataListener.onRefresh();
}
}
});
代码示例来源:origin: 7449/Retrofit_RxJava_MVP
@Override
public void onLoadMore() {
if (!srfLayout.isRefreshing()) {
++page;
newsListPresenter.requestNetWork(index + 1, page);
}
}
代码示例来源:origin: zyycj/FuLiApp
@Override public void onScrolled(RecyclerView rv, int dx, int dy) {
boolean isBottom = layoutManager.findLastCompletelyVisibleItemPositions(new int[2])[1] >= imageRecyclerViewAdapter.getItemCount() - PRELOAD_SIZE;
if (!swipeRefreshLayout.isRefreshing() && isBottom) {
swipeRefreshLayout.setRefreshing(true);
mPage++;
preHttpRequest();
}
}
};
代码示例来源:origin: liuyanggithub/SuperMvp
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
boolean isBottom = mGridViewLayoutManager.findLastCompletelyVisibleItemPositions(new int[2])[1]
>= adapter.getItemCount() - PRELOAD_SIZE;
if (!swipe_refresh_layout.isRefreshing() && isBottom) {
callBack.loadMore();
}
}
代码示例来源:origin: laotan7237/EasyReader
@Override
public void refreshSectionData(SectionChildListBean data) {
storiesList = data.getStories();
zhihuSectionAdapter.setNewData(storiesList);
zhihuSectionAdapter.notifyDataSetChanged();
if (swipeRefresh.isRefreshing()) {
swipeRefresh.setRefreshing(false);
}
setToolBar(toolbarThemeBase, data.getName());
tvThemeChildDes.setText(data.getName());
}
代码示例来源:origin: laotan7237/EasyReader
@Override
public void refreshView(ThemeChildListBean data) {
storiesList = data.getStories();
zhihuThemeAdapter.setNewData(storiesList);
zhihuThemeAdapter.notifyDataSetChanged();
if (swipeRefresh.isRefreshing()) {
swipeRefresh.setRefreshing(false);
}
setToolBar(toolbarThemeBase, data.getName());
GlideUtils.load(this, data.getBackground(), ivThemeChildOrigin);
Glide.with(this).load(data.getBackground()).bitmapTransform(new BlurTransformation(this)).into(ivThemeChildBlur);
tvThemeChildDes.setText(data.getDescription());
}
内容来源于网络,如有侵权,请联系作者删除!