@Override
 public MediaObjectCollection getPhotos(int pageSize, int pageNo) throws Exception {
   Log.d(TAG, String.format("page size %s and page# %s", pageSize, pageNo)); // $NON-NLS-1$
   Flickr f = FlickrHelper.getInstance().getFlickrAuthed(mAuthToken, mTokenSecret);
   PhotosetsInterface psi = f.getPhotosetsInterface();
   Photoset photoset =
       psi.getPhotos(
           mPhotoset.getId(), mExtras, Flickr.PRIVACY_LEVEL_NO_FILTER, pageSize, pageNo + 1);
   User user = photoset.getOwner();
   MediaObjectCollection col = ModelUtils.convertFlickrPhotoList(photoset.getPhotoList(), user);
   return col;
 }
Esempio n. 2
0
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      View result = convertView;
      if (result == null) {
        LayoutInflater li = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        result = li.inflate(R.layout.listview_item, parent, false);
      }

      TextView tv = (TextView) result.findViewById(R.id.item);
      Photoset p = photosets.get(position);
      tv.setText(String.format("%s (%d)", p.getTitle(), p.getPhotoCount()));

      return result;
    }