Пример #1
0
  private void handleGetMyThrowPhotos(ThrowPhoto[] throwPhotos) {
    int count = throwPhotos != null ? throwPhotos.length : 0;
    if (count != mThrowPhotoAdapter.getCount()) {
      mThrowPhotoAdapter.updateThrowPhotos(throwPhotos);
    }
    mNowLoading = false;
    postEvent(new PageEvent(this, PageEvent.Event.LOAD_DONE));

    if (mBackgroundView != null) {
      mBackgroundView.setVisibility(mThrowPhotoAdapter.getCount() > 0 ? View.GONE : View.VISIBLE);
    }
  }
Пример #2
0
 @Override
 public void onAddToContentBackground(ViewGroup container) {
   if (mBackgroundView == null) {
     mBackgroundView =
         LayoutInflater.from(mContext)
             .inflate(R.layout.user_no_throw_photo_layout, container, false);
   }
   ViewGroup parent = (ViewGroup) mBackgroundView.getParent();
   if (parent != null) {
     parent.removeView(mBackgroundView);
   }
   container.addView(mBackgroundView);
   mBackgroundView.setVisibility(mThrowPhotoAdapter.getCount() > 0 ? View.GONE : View.VISIBLE);
 }