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);
   }
 }
 private void initListViewScrollListener() {
   AbsListView.OnScrollListener scrollListener = (AbsListView.OnScrollListener) getActivity();
   gridView.setOnScrollListener(
       new OnLoadMoreScrollListener(scrollListener) {
         @Override
         public void onLoadMore(int page, int totalItemsCount) {
           showList(page);
         }
       });
 }