예제 #1
0
 private void initGridView() {
   adapter = new PhotosAdapter(getActivity(), new ArrayList<Photo>());
   loadingFooter = new ListLoadingView(getActivity());
   gridView.addFooterView(loadingFooter);
   gridView.setAdapter(adapter);
   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
     gridView.setNestedScrollingEnabled(true);
   }
 }
예제 #2
0
 private void initListViewScrollListener() {
   AbsListView.OnScrollListener scrollListener = (AbsListView.OnScrollListener) getActivity();
   gridView.setOnScrollListener(
       new OnLoadMoreScrollListener(scrollListener) {
         @Override
         public void onLoadMore(int page, int totalItemsCount) {
           showList(page);
         }
       });
 }