本文整理汇总了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();
}
});
}
示例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);
}