R
- The type of the resource that will be transitioned into a view.public class ViewPropertyTransition<R> extends Object implements Transition<R>
Transition
that accepts an interface that can apply an animation like a ViewPropertyAnimator
or a ObjectAnimator
that can be used
to transition a resource into a View
.限定符和类型 | 类和说明 |
---|---|
static interface |
ViewPropertyTransition.Animator
An interface that allows an animation to be applied on or started from an
View . |
Transition.ViewAdapter
构造器和说明 |
---|
ViewPropertyTransition(ViewPropertyTransition.Animator animator)
Constructor for a view property animation that takes an
ViewPropertyTransition.Animator
interface that can apply a transition to a view. |
限定符和类型 | 方法和说明 |
---|---|
boolean |
transition(R current,
Transition.ViewAdapter adapter)
Always applies the
ViewPropertyTransition.Animator given in the constructor to the
given view and returns false because the animator cannot put the new resource on the
view. |
public ViewPropertyTransition(ViewPropertyTransition.Animator animator)
ViewPropertyTransition.Animator
interface that can apply a transition to a view.animator
- The animator to use.public boolean transition(R current, Transition.ViewAdapter adapter)
ViewPropertyTransition.Animator
given in the constructor to the
given view and returns false
because the animator cannot put the new resource on the
view.transition
在接口中 Transition<R>
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()
.