<com.handmark.pulltorefresh.library.PullToRefreshExpandableListView android:id="@+id/expand_list" android:layout_width="match_parent" android:layout_height="match_parent" />
mExpandList = (PullToRefreshExpandableListView) rootView.findViewById(R.id.expand_list); mExpandList.getRefreshableView().setGroupIndicator(null); mExpandList.getRefreshableView().setDivider(null); mExpandList.getRefreshableView().setSelector(android.R.color.transparent); mExpandList.getRefreshableView().setOnGroupClickListener(this); mExpandList.setOnRefreshListener(this);
@Override
public void onRefresh(PullToRefreshBase<ExpandableListView> refreshView) {
if (!isRefreshing) {
isRefreshing = true;
updateList(true);
} else {
mExpandList.onRefreshComplete();
}
}
// set mode to BOTH mExpandList.setMode(Mode.BOTH); mExpandList.getLoadingLayoutProxy(false, true).setPullLabel(getString(R.string.pull_to_load)); mExpandList.getLoadingLayoutProxy(false, true).setRefreshingLabel(getString(R.string.loading)); mExpandList.getLoadingLayoutProxy(false, true).setReleaseLabel(getString(R.string.release_to_load));
public boolean isHeaderShown() {
return getHeaderLayout().isShown();
}
public boolean isFooterShown() {
return getFooterLayout().isShown();
}
@Override
public void onRefresh(PullToRefreshBase<ExpandableListView> refreshView) {
if (!isRefreshing) {
isRefreshing = true;
if (mExpandList.isHeaderShown()) {
Utils.LOGD("pull-to-refresh");
refreshOnlineStatus(true);
} else if (mExpandList.isFooterShown()) {
Utils.LOGD("pull-to-load-more");
loadNextPage();
}
} else {
mExpandList.onRefreshComplete();
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有