当前位置: 首页>>代码示例>>Java>>正文


Java MaterialRefreshListener类代码示例

本文整理汇总了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();
        }
    });
}
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:29,代码来源:AdvisoryFragment.java

示例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();
        }
    });
}
 
开发者ID:duguju,项目名称:MousePaintYzz,代码行数:12,代码来源:RecommendActivity.java

示例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();
        }
    });
}
 
开发者ID:duguju,项目名称:MousePaintYzz,代码行数:14,代码来源:HomeFragment.java

示例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();
        }
    });
}
 
开发者ID:duguju,项目名称:MousePaintYzz,代码行数:12,代码来源:WeekActivity.java


注:本文中的com.cjj.MaterialRefreshListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。