Ejemplo n.º 1
0
 @Override
 public void showLoading() {
   if (canCustomFooter()) {
     if (mHeaderAdapter != null) {
       mHeaderAdapter.setFooter(getLoading());
     } else if (mListView != null) {
       removeListViewFooters();
       mListView.addFooterView(getLoading(), null, false);
     }
   }
 }
Ejemplo n.º 2
0
 @Override
 public void showEnd() {
   if (canCustomFooter()) {
     if (mHeaderAdapter != null) {
       if (mHeaderAdapter.getBasicItemCount() != 0) {
         mHeaderAdapter.setFooter(getLoadEnd());
       } else {
         mHeaderAdapter.removeFooter();
       }
     } else if (mListView != null) {
       removeListViewFooters();
       int actualChildCount =
           mListView.getCount()
               - mListView.getHeaderViewsCount()
               - mListView.getFooterViewsCount();
       if (actualChildCount > 0) {
         mListView.addFooterView(getLoadEnd(), null, false);
       }
     }
   }
 }