Android Open Source - android-slideshow-widget Slide Show Adapter






From Project

Back to project page android-slideshow-widget.

License

The source code is released under:

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions...

If you think the Android project android-slideshow-widget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.marvinlabs.widget.slideshow;
/* w  w  w.  jav  a  2 s  . co m*/
import android.widget.Adapter;

/**
 * A SlideAdapter object acts as a bridge between a SlideShowView and the underlying SlideShow.
 * The SlideAdapter is responsible for making a View for each slide in the slideshow.
 * <p/>
 * Created by Vincent Mimoun-Prat @ MarvinLabs on 28/05/2014.
 */
public interface SlideShowAdapter extends Adapter {

    public enum SlideStatus {
        READY, LOADING, NOT_AVAILABLE;
    }

    /**
     * This function is called when a slide is scheduled to be next to play. You can take this opportunity to do some work to get
     * that slide ready to play (e.g. download the corresponding image)
     *
     * @param position The next slide index
     */
    public void prepareSlide(int position);

    /**
     * This function is called when a slide won't be needed anymore (until it gets prepared again). This is an opportunity to release
     * memory corresponding to the slide that got prepared previously.
     *
     * @param position The slide index
     */
    public void discardSlide(int position);

    /**
     * Is the slide at that position ready to be played? The slide show will wait until that slide is ready to be played or until the adapter
     * says the slide will never be ready and thus should skip it.
     *
     * @param position The slide index
     * @return The status of the given slide
     */
    public SlideStatus getSlideStatus(int position);

}




Java Source Code List

com.marvinlabs.widget.slideshow.PlayList.java
com.marvinlabs.widget.slideshow.SlideShowAdapter.java
com.marvinlabs.widget.slideshow.SlideShowView.java
com.marvinlabs.widget.slideshow.TransitionFactory.java
com.marvinlabs.widget.slideshow.adapter.BitmapAdapter.java
com.marvinlabs.widget.slideshow.adapter.GenericBitmapAdapter.java
com.marvinlabs.widget.slideshow.adapter.GenericRemoteBitmapAdapter.java
com.marvinlabs.widget.slideshow.adapter.GenericResourceBitmapAdapter.java
com.marvinlabs.widget.slideshow.adapter.RemoteBitmapAdapter.java
com.marvinlabs.widget.slideshow.adapter.ResourceBitmapAdapter.java
com.marvinlabs.widget.slideshow.demo.SlideShowActivity.java
com.marvinlabs.widget.slideshow.picasso.GenericPicassoBitmapAdapter.java
com.marvinlabs.widget.slideshow.picasso.PicassoRemoteBitmapAdapter.java
com.marvinlabs.widget.slideshow.picasso.PicassoResourceBitmapAdapter.java
com.marvinlabs.widget.slideshow.playlist.RandomPlayList.java
com.marvinlabs.widget.slideshow.playlist.SequentialPlayList.java
com.marvinlabs.widget.slideshow.transition.BaseTransitionFactory.java
com.marvinlabs.widget.slideshow.transition.FadeTransitionFactory.java
com.marvinlabs.widget.slideshow.transition.FlipTransitionFactory.java
com.marvinlabs.widget.slideshow.transition.NoTransitionFactory.java
com.marvinlabs.widget.slideshow.transition.RandomTransitionFactory.java
com.marvinlabs.widget.slideshow.transition.SlideAndZoomTransitionFactory.java
com.marvinlabs.widget.slideshow.transition.ZoomTransitionFactory.java