本文整理汇总了Java中com.cjj.MaterialRefreshListener类的典型用法代码示例。如果您正苦于以下问题:Java MaterialRefreshListener类的具体用法?Java MaterialRefreshListener怎么用?Java MaterialRefreshListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MaterialRefreshListener类属于com.cjj包,在下文中一共展示了MaterialRefreshListener类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initListener
import com.cjj.MaterialRefreshListener; //导入依赖的package包/类
private void initListener() {
mDataList.setLayoutManager(new LinearLayoutManager(getContext()){
@Override
public boolean canScrollVertically() {
return false;
}
});
mDataList.setItemAnimator(new SlideInOutTopItemAnimator(mDataList));
mDataList.addItemDecoration(new DividerItemDecoration(getContext(),
DividerItemDecoration.VERTICAL_LIST));
mAdvisoryAdapter = new AdvisoryAdapter(getContext(), mDatas);
mAdvisoryAdapter.setOnItemClickListener((view, position) -> {
int index = mDatas.size()-position-1; //不太明白,为什么显示的是倒叙
AdvisoryFragmentBean.ResultsBean resultsBean = mDatas.get(index);
String userid = resultsBean.getUserid();
Intent intent = new Intent(getActivity(), UserDetailActivity.class);
intent.putExtra(Contants.USER_ID, userid);
intent.putExtra(Contants.C_USER_ID, userid);
startActivity(intent);
});
mDataList.setAdapter(mAdvisoryAdapter);
mRefreshLayout.setMaterialRefreshListener(new MaterialRefreshListener() {
@Override
public void onRefresh(MaterialRefreshLayout materialRefreshLayout) {
refreshData();
}
});
}
示例2: Data
import com.cjj.MaterialRefreshListener; //导入依赖的package包/类
private void Data() {
viewSelectorLayout.show_LoadingView();
getRecommendBookData();
refreshLayout.setMaterialRefreshListener(new MaterialRefreshListener() {
@Override
public void onRefresh(MaterialRefreshLayout materialRefreshLayout) {
getRecommendBookData();
}
});
}
示例3: onActivityCreated
import com.cjj.MaterialRefreshListener; //导入依赖的package包/类
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
viewSelectorLayout.show_LoadingView();
getBookData();
refreshLayout.setMaterialRefreshListener(new MaterialRefreshListener() {
@Override
public void onRefresh(MaterialRefreshLayout materialRefreshLayout) {
getBookData();
}
});
}
示例4: Data
import com.cjj.MaterialRefreshListener; //导入依赖的package包/类
private void Data() {
viewSelectorLayout.show_LoadingView();
getWeekBookData();
refreshLayout.setMaterialRefreshListener(new MaterialRefreshListener() {
@Override
public void onRefresh(MaterialRefreshLayout materialRefreshLayout) {
getWeekBookData();
}
});
}