本文整理了Java中com.yzs.yzsbaseactivitylib.yzsbase.YzsBaseMvpListFragment
类的一些代码示例,展示了YzsBaseMvpListFragment
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YzsBaseMvpListFragment
类的具体详情如下:
包路径:com.yzs.yzsbaseactivitylib.yzsbase.YzsBaseMvpListFragment
类名称:YzsBaseMvpListFragment
[英]Author: 姚智胜 Version: V1.0版本 Description: Date: 2018/1/9 Email: 541567595@qq.com
[中]作者:姚智胜 版本:V1。0版本 描述:日期:2018年1月9日电子邮件:541567595@qq.com
代码示例来源:origin: yaozs/YzsBaseActivity
/**
* 包含错误处理自动化,在接口返回错误处使用
*
* @param tList
* @param empty_str
* @param empty_res
* @param isFail
*/
public void autoListLoad(@Nullable List<D> tList, String empty_str, @DrawableRes int empty_res, boolean isFail) {
if (isFail && getPage() != startPageNum) {
failLoadMore();
} else {
autoListLoad(tList, empty_str, empty_res);
}
}
代码示例来源:origin: yaozs/YzsBaseActivity
/**
* 提供改变显示方法(该方法用于布局显示后动态改变显示方式)
*/
protected void changeShowType(@ListType int listType, boolean isVertical) {
chooseListType(listType, isVertical);
}
}
代码示例来源:origin: yaozs/YzsBaseActivity
public void autoListLoad(@Nullable List<D> tList, String empty_str, @DrawableRes int Empty_res) {
tList = tList == null ? new ArrayList<D>() : tList;
if (getPage() == startPageNum) {
okRefresh();
mAdapter.setNewData(tList);
if (tList.size() == 0) {
mAdapter.setEmptyView(getEmptyView(empty_str, Empty_res));
}
} else {
if (tList.size() == mPageSize) {
okLoadMore(true);
} else {
okLoadMore(false);
}
mAdapter.addData(tList);
}
}
代码示例来源:origin: yaozs/YzsBaseActivity
@Override
protected void initView(View view) {
if (0 == getLayoutRes()) {
throw new RuntimeException("layoutResId is null!");
mAdapter = new YzsListAdapter(initItemLayout(), new ArrayList<D>());
initSetting();
chooseListType(mListType, mIsVertical);
代码示例来源:origin: yaozs/YzsBaseActivity
mAdapter = new YzsListAdapter(initItemLayout(), new ArrayList<D>());
initSetting();
chooseListType(mListType, mIsVertical);
代码示例来源:origin: yaozs/YzsLib
@Override
protected void initView(View view) {
super.initView(view);
setMvp(true);
}
代码示例来源:origin: yaozs/YzsBaseActivity
@Override
protected int getLayoutRes() {
setMvp(false);
return super.getLayoutRes();
}
代码示例来源:origin: yaozs/YzsBaseActivity
case BaseListType.LINEAR_LAYOUT_MANAGER:
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
case BaseListType.GRID_LAYOUT_MANAGER:
GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), mSpanCount);
default:
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
内容来源于网络,如有侵权,请联系作者删除!