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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn interface wrapping a view that exposes the necessary methods to run the various types of android animations as transitions: (ViewTransition,ViewPropertyTransitionand animatedDrawables). -
Method Summary
Modifier and TypeMethodDescriptionbooleantransition(R current, Transition.ViewAdapter adapter) Animates from the previousDrawablethat is currently being displayed in the given view, if not null, to the new resource that should be displayed in the view.
-
Method Details
-
transition
Animates from the previousDrawablethat 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- TheTransition.ViewAdapterwrapping a view that can at least return anViewfromTransition.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.
-