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();
  }
예제 #2
0
 /** リスト表示項目を追加する */
 protected void setItems(List<FriendModel> items) {
   mAdapter.setData(items);
 }