Ejemplo n.º 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);
   }
 }
Ejemplo n.º 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);
         }
       });
 }