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


Java MaterialRefreshLayout类代码示例

本文整理汇总了Java中com.cjj.MaterialRefreshLayout的典型用法代码示例。如果您正苦于以下问题:Java MaterialRefreshLayout类的具体用法?Java MaterialRefreshLayout怎么用?Java MaterialRefreshLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MaterialRefreshLayout类属于com.cjj包,在下文中一共展示了MaterialRefreshLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initRefresh

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
private void initRefresh(MaterialRefreshLayout materialRefreshLayout) {
    page = 1; //重置  在刷新的时候
    OkGo.post(HttpUrlPaths.LORD_DETAIL_URL)
            .params("catgId", catgId)
            .params("page", page)
            .params("userid", 0)
            .getCall(StringConvert.create(), RxAdapter.<String>create())
            .doOnSubscribe(() -> {
            })
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(s -> {
                Type type = new TypeToken<LordDetailBean>() {
                }.getType();
                LordDetailBean bean = new Gson().fromJson(s, type);
                if (bean.getErrorStr().equals("success")
                        && bean.getErrorCode() == 0
                        && bean.getResultCount() > 0) {
                    mLordDetailDatas.clear();
                    detailAdapter.notifyDataSetChanged();
                    mLordRefresh.finishRefresh();
                }
            }, throwable -> {
            });


}
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:27,代码来源:LordDetailActivity.java

示例2: initView

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
/**
 * 初始化View
 *
 * @param view
 */
private void initView(View view) {
    mActionSearchView = (ImageButton) view.findViewById(R.id.action_search_view);
    mSortAllTxt = (TextView) view.findViewById(R.id.sort_all_txt);
    mSortAllLayout = (LinearLayout) view.findViewById(R.id.sort_all_layout);
    mSortConsultantCntTxt = (TextView) view.findViewById(R.id.sort_consultant_cnt_txt);
    mSortConsultantCntLayout = (LinearLayout) view.findViewById(R.id.sort_consultant_cnt_layout);
    mSortPriceTxt = (TextView) view.findViewById(R.id.sort_price_txt);
    mSortPriceIcon = (ImageView) view.findViewById(R.id.sort_price_icon);
    mSortAllTxt = (TextView) view.findViewById(R.id.sort_all_txt);

    mSortPriceLayout = (RelativeLayout) view.findViewById(R.id.sort_price_layout);
    mSortContinuedPercentTxt = (TextView) view.findViewById(R.id.sort_continued_percent_txt);

    mSortContinuedPercentLayout = (LinearLayout) view.findViewById(R.id.sort_continued_percent_layout);
    mFlyBanner = (FlyBanner) view.findViewById(R.id.fly_banner);

    mSortCommentRatingLayout = (LinearLayout) view.findViewById(R.id.sort_comment_rating_layout);
    mSortHeaderLayout = (LinearLayout) view.findViewById(R.id.sort_header_layout);

    mDataList = (RecyclerView) view.findViewById(R.id.data_list);

    mRefreshLayout = (MaterialRefreshLayout) view.findViewById(R.id.refresh_layout);


}
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:31,代码来源:AdvisoryFragment.java

示例3: handRefreshMore

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
private void handRefreshMore(MaterialRefreshLayout materialRefreshLayout) {
    switch (mViewPager_book.getCurrentItem())
    {
        case 0:
            EventBus.getDefault().post(new RefreshEvent(materialRefreshLayout,"refresh_hot"));
            break;
        case 1:
            EventBus.getDefault().post(new RefreshEvent(materialRefreshLayout,"refresh_same"));
            break;
        case 2:
            EventBus.getDefault().post(new RefreshEvent(materialRefreshLayout,"refresh_mouse"));
            break;
        case 3:

            break;
    }
}
 
开发者ID:duguju,项目名称:MousePaintYzz,代码行数:18,代码来源:CategoryFragment.java

示例4: onRefreshLoadMore

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
@Override
public void onRefreshLoadMore(final MaterialRefreshLayout materialRefreshLayout) {
    LogUtils.i("load more: start=" + start);
    String arcIds = parseIds();
    if (!TextUtils.isEmpty(arcIds)) {
        requestNews(arcIds, false, true);
    } else {
        ToastUtils.showToast("已经到底啦");
        complete();
    }
}
 
开发者ID:smuyyh,项目名称:SprintNBA,代码行数:12,代码来源:NewsListFragment.java

示例5: initRefresh

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
private void initRefresh(MaterialRefreshLayout materialRefreshLayout) {
    page = 1;
    OkGo.post(HttpUrlPaths.SCAN_MORE)
            .params("userid", "54442")
            .params("page", page + "")
            .getCall(StringConvert.create(), RxAdapter.<String>create())
            .doOnSubscribe(() -> {

            })
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(s -> {
                Type type = new TypeToken<HomeNewsBean>() {
                }.getType();
                HomeNewsBean bean = new Gson().fromJson(s, type);
                if (bean.getErrorCode() == 0
                        && bean.getErrorStr().equals("success")
                        && bean.getResults().size() > 0) {
                    mOrationDatas.clear();
                    mOrationDatas = bean.getResults();
                    mOrationAdapter.addData(mOrationDatas);
                    materialRefreshLayout.finishRefresh();

                }
            }, throwable -> {

            });
}
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:28,代码来源:OrationActivity.java

示例6: initListener

import com.cjj.MaterialRefreshLayout; //导入依赖的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

示例7: initView

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
/**
 * 初始化布局控件
 */
private void initView() {

    mRefreshLayout = (MaterialRefreshLayout) findViewById(R.id.refresh);
    mRecyclerView = (RecyclerView) findViewById(R.id.recycleview);
    initRefresh();
}
 
开发者ID:wuyinlei,项目名称:MaterialRefreshLayoutDemo,代码行数:10,代码来源:MainActivity.java

示例8: Data

import com.cjj.MaterialRefreshLayout; //导入依赖的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

示例9: onActivityCreated

import com.cjj.MaterialRefreshLayout; //导入依赖的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

示例10: Data

import com.cjj.MaterialRefreshLayout; //导入依赖的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

示例11: setRefreshLayout

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
public Builder setRefreshLayout(MaterialRefreshLayout refreshLayout) {

            this.mRefreshLayout = refreshLayout;
            return builder;
        }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:Pager.java

示例12: setRefreshLayout

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
public Builder setRefreshLayout(MaterialRefreshLayout refreshLayout){

            this.mRefreshLayout = refreshLayout;
            return builder;
        }
 
开发者ID:zzlnewair,项目名称:Myshop,代码行数:6,代码来源:Pager.java

示例13: onRefresh

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
@Override
public void onRefresh(final MaterialRefreshLayout materialRefreshLayout) {
    requestIndex(true);
}
 
开发者ID:smuyyh,项目名称:SprintNBA,代码行数:5,代码来源:NewsListFragment.java

示例14: onRefresh

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
@Override
public void onRefresh(final MaterialRefreshLayout materialRefreshLayout) {
    presenter.requestTeamsRank(true);
}
 
开发者ID:smuyyh,项目名称:SprintNBA,代码行数:5,代码来源:TeamSortFragment.java

示例15: onRefresh

import com.cjj.MaterialRefreshLayout; //导入依赖的package包/类
@Override
public void onRefresh(final MaterialRefreshLayout materialRefreshLayout) {
    requestMatchs(date, true);
}
 
开发者ID:smuyyh,项目名称:SprintNBA,代码行数:5,代码来源:ScheduleFragment.java


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