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


Java EasyRecyclerView.setRefreshListener方法代码示例

本文整理汇总了Java中com.jude.easyrecyclerview.EasyRecyclerView.setRefreshListener方法的典型用法代码示例。如果您正苦于以下问题:Java EasyRecyclerView.setRefreshListener方法的具体用法?Java EasyRecyclerView.setRefreshListener怎么用?Java EasyRecyclerView.setRefreshListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jude.easyrecyclerview.EasyRecyclerView的用法示例。


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

示例1: onViewCreated

import com.jude.easyrecyclerview.EasyRecyclerView; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    mRecyclerView = (EasyRecyclerView) view.findViewById(R.id.recycler_fragment_comment);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setRefreshListener(this);
    mAdatper = new CommentAdatper(getActivity());
    mRecyclerView.setAdapterWithProgress(mAdatper);
    mAdatper.setMore(R.layout.view_moreprogress, this);
    mTopic = (Topic) getArguments().getSerializable("topic");

    fetchData();
    addHeader();
    mAdatper.notifyDataSetChanged();
    page = 1;
}
 
开发者ID:Fukago,项目名称:TravelBan,代码行数:17,代码来源:CommentFragment.java

示例2: initView

import com.jude.easyrecyclerview.EasyRecyclerView; //导入方法依赖的package包/类
private void initView() {
    inflate(getContext(), R.layout.view_girls_content, this);
    mNetworkErrorLayout = (ViewStub) findViewById(R.id.network_error_layout);
    mGirlsRecyclerView = (EasyRecyclerView) findViewById(R.id.girls_recycler_view);
    StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
    mGirlsRecyclerView.setLayoutManager(staggeredGridLayoutManager);
    mAdapter = new GirlsAdapter(getContext());

    mGirlsRecyclerView.setAdapterWithProgress(mAdapter);
    mGirlsRecyclerView.setRefreshingColor(
            ContextCompat.getColor(getContext(), R.color.colorPrimary),
            ContextCompat.getColor(getContext(), android.R.color.holo_blue_light),
            ContextCompat.getColor(getContext(), android.R.color.holo_green_light)
    );
    mAdapter.setMore(R.layout.layout_load_more, this);
    mAdapter.setNoMore(R.layout.layout_load_no_more);
    mAdapter.setError(R.layout.layout_load_error);
    mAdapter.setOnMyItemClickListener(new GirlsAdapter.OnMyItemClickListener() {
        @Override
        public void onItemClick(int position, BaseViewHolder holder) {
            Intent intent = new Intent(Utils.getActivity(GirlsView.this), GirlActivity.class);
            intent.putParcelableArrayListExtra(Constants.INTENT_GIRLS, mData);
            intent.putExtra(Constants.INTENT_INDEX, position);
            ActivityOptionsCompat options = ActivityOptionsCompat.makeScaleUpAnimation(holder.itemView, holder.itemView.getWidth() / 2, holder.itemView.getHeight() / 2, 0, 0);
            Utils.getActivity(GirlsView.this).startActivity(intent, options.toBundle());
        }
    });

    mGirlsRecyclerView.setRefreshListener(this);

    mData = new ArrayList<>();
    mActive = true;
}
 
开发者ID:guiying712,项目名称:AndroidModulePattern,代码行数:34,代码来源:GirlsView.java

示例3: onViewCreated

import com.jude.easyrecyclerview.EasyRecyclerView; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    mRecyclerView = (EasyRecyclerView) view.findViewById(R.id.recycler_fragment_topic);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mAdapter = new TopicAdapter(getActivity());
    mRecyclerView.setAdapterWithProgress(mAdapter);
    mRecyclerView.setRefreshListener(this);
    mAdapter.setMore(R.layout.view_moreprogress, this);
    mAdapter.setNoMore(R.layout.view_nomore);
    fetchData();
    page=1;
}
 
开发者ID:Fukago,项目名称:TravelBan,代码行数:15,代码来源:TopicFragment.java


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