本文整理了Java中android.support.v4.widget.SwipeRefreshLayout.post()
方法的一些代码示例,展示了SwipeRefreshLayout.post()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SwipeRefreshLayout.post()
方法的具体详情如下:
包路径:android.support.v4.widget.SwipeRefreshLayout
类名称:SwipeRefreshLayout
方法名:post
暂无
代码示例来源:origin: nanchen2251/RxJava2Examples
@Override
public void onRefresh() {
mRefreshLayout.post(new Runnable() {
@Override
public void run() {
mRefreshLayout.setRefreshing(false);
}
});
}
}
代码示例来源:origin: iMeiji/Toutiao
@Override
public void onShowLoading() {
swipeRefreshLayout.post(() -> swipeRefreshLayout.setRefreshing(true));
}
代码示例来源:origin: iMeiji/Toutiao
@Override
public void onHideLoading() {
swipeRefreshLayout.post(() -> swipeRefreshLayout.setRefreshing(false));
}
代码示例来源:origin: iMeiji/Toutiao
@Override
public void onHideLoading() {
progressBar.hide();
swipeRefreshLayout.post(() -> swipeRefreshLayout.setRefreshing(false));
}
代码示例来源:origin: iMeiji/Toutiao
@Override
public void onHideLoading() {
progressBar.hide();
swipeRefreshLayout.post(() -> swipeRefreshLayout.setRefreshing(false));
}
代码示例来源:origin: iMeiji/Toutiao
@Override
public void onHideLoading() {
progressBar.hide();
swipeRefreshLayout.post(() -> swipeRefreshLayout.setRefreshing(false));
}
代码示例来源:origin: iMeiji/Toutiao
@Override
public void onRefresh() {
swipeRefreshLayout.post(new Runnable() {
@Override
public void run() {
swipeRefreshLayout.setRefreshing(true);
}
});
onLoadData();
}
});
代码示例来源:origin: iMeiji/Toutiao
@Override
public void onHideLoading() {
progressBar.hide();
swipeRefreshLayout.post(() -> swipeRefreshLayout.setRefreshing(false));
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
protected void initRefreshLayout() {
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
mSwipeRefreshLayout.post(() -> {
mSwipeRefreshLayout.setRefreshing(true);
loadData();
});
mSwipeRefreshLayout.setOnRefreshListener(() -> mSwipeRefreshLayout.setRefreshing(false));
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
public void initRefreshLayout() {
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
mSwipeRefreshLayout.setOnRefreshListener(this::loadData);
mSwipeRefreshLayout.post(() -> {
mSwipeRefreshLayout.setRefreshing(true);
loadData();
});
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
protected void initRefreshLayout() {
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
mSwipeRefreshLayout.setOnRefreshListener(this::loadData);
mSwipeRefreshLayout.post(() -> {
mSwipeRefreshLayout.setRefreshing(true);
loadData();
});
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
public void initRefreshLayout() {
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
mSwipeRefreshLayout.post(() -> {
mIsRefreshing = true;
mSwipeRefreshLayout.setRefreshing(true);
loadData();
});
mSwipeRefreshLayout.setOnRefreshListener(() -> {
mIsRefreshing = true;
topicCenters.clear();
loadData();
});
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
protected void initRefreshLayout() {
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
mSwipeRefreshLayout.post(() -> {
mSwipeRefreshLayout.setRefreshing(true);
mIsRefreshing = true;
loadData();
});
mSwipeRefreshLayout.setOnRefreshListener(() -> {
mIsRefreshing = true;
originalRanks.clear();
loadData();
});
}
代码示例来源:origin: lygttpod/SuperTextView
@Override
public void onRefresh() {
getRefreshData();
adapter.notifyDataSetChanged();
swipeRefreshLayout.post(new Runnable() {
@Override
public void run() {
swipeRefreshLayout.setRefreshing(false);
}
});
}
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
public void initRefreshLayout() {
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
mSwipeRefreshLayout.post(() -> {
mSwipeRefreshLayout.setRefreshing(true);
loadData();
});
mSwipeRefreshLayout.setOnRefreshListener(() -> {
pageNum = 1;
mIsRefreshing = true;
activityCenters.clear();
mEndlessRecyclerOnScrollListener.refresh();
loadData();
});
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
protected void initRefreshLayout() {
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
mSwipeRefreshLayout.post(() -> {
mSwipeRefreshLayout.setRefreshing(true);
mIsRefreshing = true;
loadData();
});
mSwipeRefreshLayout.setOnRefreshListener(() -> {
clearData();
loadData();
});
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
protected void initRefreshLayout() {
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
mSwipeRefreshLayout.post(() -> {
mSwipeRefreshLayout.setRefreshing(true);
mIsRefreshing = true;
loadData();
});
mSwipeRefreshLayout.setOnRefreshListener(() -> {
clearData();
loadData();
});
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
protected void initRefreshLayout() {
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
mSwipeRefreshLayout.post(() -> {
mSwipeRefreshLayout.setRefreshing(true);
mIsRefreshing = true;
loadData();
});
mSwipeRefreshLayout.setOnRefreshListener(() -> {
clearData();
loadData();
});
}
代码示例来源:origin: iMeiji/Toutiao
@Override
protected void initView(View view) {
Toolbar toolbar = view.findViewById(R.id.toolbar);
initToolBar(toolbar, true, "");
toolbar.setOnClickListener(v -> scrollView.smoothScrollTo(0, 0));
tv_hint = view.findViewById(R.id.tv_hint);
tv_save = view.findViewById(R.id.tv_save);
tv_save.setOnClickListener(this);
viewPager = view.findViewById(R.id.viewPager);
photoView = view.findViewById(R.id.photoView);
webView = view.findViewById(R.id.webview);
scrollView = view.findViewById(R.id.scrollView);
progressBar = view.findViewById(R.id.pb_progress);
int color = SettingUtil.getInstance().getColor();
progressBar.getIndeterminateDrawable().setColorFilter(color, PorterDuff.Mode.MULTIPLY);
progressBar.show();
swipeRefreshLayout = view.findViewById(R.id.refresh_layout);
swipeRefreshLayout.setColorSchemeColors(SettingUtil.getInstance().getColor());
swipeRefreshLayout.setOnRefreshListener(() -> {
swipeRefreshLayout.post(() -> swipeRefreshLayout.setRefreshing(true));
presenter.doLoadData(shareUrl);
});
setHasOptionsMenu(true);
}
代码示例来源:origin: Naoki2015/CircleDemo
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
presenter = new CirclePresenter(this);
initView();
initPermission();
//实现自动下拉刷新功能
recyclerView.getSwipeToRefresh().post(new Runnable(){
@Override
public void run() {
recyclerView.setRefreshing(true);//执行下拉刷新的动画
refreshListener.onRefresh();//执行数据加载操作
}
});
}
内容来源于网络,如有侵权,请联系作者删除!