Esempio n. 1
0
 public void updateBucketId(String bucketId) {
   if (!mBucketId.equals(bucketId)) {
     mSlideshowHandler.removeCallbacks(mSlideshowAction);
     mBucketId = bucketId;
     mSlideShowPagerAdapter =
         new SlideshowPageAdapter(mActivity, mApplication.getImageLoader(), mBucketId);
     mViewPager.setAdapter(mSlideShowPagerAdapter);
     mSlideshowHandler.postDelayed(mSlideshowAction, SLIDESHOW_INTERVAL_MS);
     mController.updateStatus(PlayStatus.PLAYING, mBucketId);
   }
 }
Esempio n. 2
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View rootView = inflater.inflate(R.layout.fragment_slideshow, container, false);
    mViewPager = (ViewPager) rootView.findViewById(R.id.pager);
    mSlideShowPagerAdapter =
        new SlideshowPageAdapter(mActivity, mApplication.getImageLoader(), mBucketId);
    mViewPager.setAdapter(mSlideShowPagerAdapter);
    return rootView;
  }