@Override
 public void showLoading() {
   if (canCustomFooter()) {
     if (mHeaderAdapter != null) {
       mHeaderAdapter.setFooter(getLoading());
     } else if (mListView != null) {
       removeListViewFooters();
       mListView.addFooterView(getLoading(), null, false);
     }
   }
 }
 @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);
       }
     }
   }
 }