public void initRecyclerView(View view) { recyclerView = (RecyclerView) view.findViewById(R.id.v_scroll); recyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER); LinearLayoutManager mLayoutMgr = new LinearLayoutManager(getContext()); recyclerView.setLayoutManager(mLayoutMgr); recyclerAdapter = new RecyclerAdapter(); recyclerView.setAdapter(recyclerAdapter); recyclerView.addOnScrollListener(mOnScrollListener); if (mLoadingFooter == null) { mLoadingFooter = new LoadingFooter(getContext()); recyclerAdapter.setFooterView(mLoadingFooter); } getDataTask(); }
/** リスト表示項目を追加する */ protected void setItems(List<FriendModel> items) { mAdapter.setData(items); }