Interface Transition<R>

  • Type Parameters:
    R - The type of the resource whose entrance will be transitioned.
    All Known Implementing Classes:
    DrawableCrossFadeTransition, NoTransition, ViewPropertyTransition, ViewTransition

    public interface Transition<R>
    An interface that allows a transition to be applied to Views in Targets in across resource types. Targets that wrap views will be able to provide all of the necessary arguments and start the transition. Those that do not will be unable to provide the necessary arguments and will therefore be forced to ignore the transition. This interface is a compromise that allows view specific transition in Glide's complex world of arbitrary resource types and arbitrary target types.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  Transition.ViewAdapter
      An interface wrapping a view that exposes the necessary methods to run the various types of android animations as transitions: (ViewTransition, ViewPropertyTransition and animated Drawables).
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean transition​(R current, Transition.ViewAdapter adapter)
      Animates from the previous Drawable that is currently being displayed in the given view, if not null, to the new resource that should be displayed in the view.
    • Method Detail

      • transition

        boolean transition​(R current,
                           Transition.ViewAdapter adapter)
        Animates from the previous Drawable that is currently being displayed in the given view, if not null, to the new resource that should be displayed in the view.
        Parameters:
        current - The new resource that will be displayed in the view.
        adapter - The Transition.ViewAdapter wrapping a view that can at least return an View from Transition.ViewAdapter.getView().
        Returns:
        True if in the process of running the transition, the new resource was put on the view, false if the caller needs to manually put the current resource on the view.