use of android.transition.ChangeClipBounds in project Conductor by bluelinelabs.
the class ArcFadeMoveChangeHandler method getTransition.
@Override
@NonNull
protected Transition getTransition(@NonNull ViewGroup container, View from, View to, boolean isPush) {
TransitionSet transition = new TransitionSet().setOrdering(TransitionSet.ORDERING_SEQUENTIAL).addTransition(new Fade(Fade.OUT)).addTransition(new TransitionSet().addTransition(new ChangeBounds()).addTransition(new ChangeClipBounds()).addTransition(new ChangeTransform())).addTransition(new Fade(Fade.IN));
transition.setPathMotion(new ArcMotion());
return transition;
}
use of android.transition.ChangeClipBounds in project Conductor by bluelinelabs.
the class ArcFadeMoveChangeHandler method getSharedElementTransition.
@Nullable
@Override
public Transition getSharedElementTransition(@NonNull ViewGroup container, @Nullable final View from, @Nullable View to, boolean isPush) {
Transition transition = new TransitionSet().addTransition(new ChangeBounds()).addTransition(new ChangeClipBounds()).addTransition(new ChangeTransform());
transition.setPathMotion(new ArcMotion());
// The framework doesn't totally fade out the "from" shared element, so we'll hide it manually once it's safe.
transition.addListener(new TransitionListener() {
@Override
public void onTransitionStart(Transition transition) {
if (from != null) {
for (String name : sharedElementNames) {
View namedView = TransitionUtils.findNamedView(from, name);
if (namedView != null) {
namedView.setVisibility(View.INVISIBLE);
}
}
}
}
@Override
public void onTransitionEnd(Transition transition) {
}
@Override
public void onTransitionCancel(Transition transition) {
}
@Override
public void onTransitionPause(Transition transition) {
}
@Override
public void onTransitionResume(Transition transition) {
}
});
return transition;
}
Aggregations