2018-11-22 RecyclerView

LinearLayoutManager linearLayoutManager =new LinearLayoutManager(NewsInfoActivity.this);

linearLayoutManager.setSmoothScrollbarEnabled(true);

linearLayoutManager.setAutoMeasureEnabled(true);

adapter.setOnLoadMoreListener(this, recyclerList);

RecyclerView.setLayoutManager(linearLayoutManager);

RecyclerView.setHasFixedSize(true);

RecyclerView.setNestedScrollingEnabled(false);

RecyclerView.setFocusable(false); //加载第一页数据不会滑动到头部

你可能感兴趣的:(2018-11-22 RecyclerView)