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


Java XRecyclerView.setLoadingMoreEnabled方法代码示例

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


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

示例1: initView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入方法依赖的package包/类
private void initView() {
    mDatas = new ArrayList<>();
    mRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.srl_refresh);
    mRecyclerView = (XRecyclerView) findViewById(R.id.base_recycler_view);
    mSearchBtn = (FloatingActionButton) findViewById(R.id.fanju_new_btn_search);
    LinearLayoutManager layoutManager = new LinearLayoutManager(this);
    layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    mRecyclerView.setLayoutManager(layoutManager);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.setPullRefreshEnabled(false);
    mRecyclerView.setLoadingMoreEnabled(false);

    mSearchBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            showSearchDialog();
        }
    });

}
 
开发者ID:henryblue,项目名称:TeaCup,代码行数:21,代码来源:FanjuNewsActivity.java

示例2: setupRecycleView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入方法依赖的package包/类
private void setupRecycleView() {
    recyclerView = (XRecyclerView) findViewById(R.id.base_recycler_view);
    if (recyclerView != null) {
        recyclerView.setHasFixedSize(true);
    }
    LinearLayoutManager mLayoutManager = new LinearLayoutManager(FindBookActivity.this);
    mLayoutManager.setOrientation(OrientationHelper.VERTICAL);
    recyclerView.setLayoutManager(mLayoutManager);
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    recyclerView.setLoadingMoreEnabled(false);
    recyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
    recyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            sendParseDataMessage(REFRESH_START);
        }

        @Override
        public void onLoadMore() {

        }
    });

    mAdapter = new FindRecycleAdapter(this, mDatas);
    mAdapter.setOnItemClickListener(new FindRecycleAdapter.OnItemClickListener() {
        @Override
        public void onItemClick(View view, int position) {
            Intent intent = new Intent(FindBookActivity.this, BookDetailActivity.class);
            intent.putExtra("book", mDatas.get(position));

            ActivityOptionsCompat options =
                    ActivityOptionsCompat.makeSceneTransitionAnimation(FindBookActivity.this,
                            view.findViewById(R.id.iv_book_img),
                            getString(R.string.transition_book_img));

            ActivityCompat.startActivity(FindBookActivity.this, intent, options.toBundle());
        }
    });

    recyclerView.setAdapter(mAdapter);
}
 
开发者ID:henryblue,项目名称:TeaCup,代码行数:42,代码来源:FindBookActivity.java


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