Search in sources :

Example 1 with ExitFragmentTransition

use of com.kogitune.activity_transition.fragment.ExitFragmentTransition in project PreLollipopTransition by takahirom.

the class SubFragment method onCreateView.

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_sub, container, false);
    final ExitFragmentTransition exitFragmentTransition = FragmentTransition.with(this).interpolator(new LinearOutSlowInInterpolator()).to(v.findViewById(R.id.sub_imageView)).start(savedInstanceState);
    exitFragmentTransition.exitListener(new AnimatorListenerAdapter() {

        @Override
        public void onAnimationStart(Animator animation) {
            Log.d("TAG", "onAnimationStart: ");
        }

        @Override
        public void onAnimationEnd(Animator animation) {
            Log.d("TAG", "onAnimationEnd: ");
        }
    }).interpolator(new FastOutSlowInInterpolator());
    exitFragmentTransition.startExitListening();
    return v;
}
Also used : LinearOutSlowInInterpolator(android.support.v4.view.animation.LinearOutSlowInInterpolator) Animator(android.animation.Animator) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter) FastOutSlowInInterpolator(android.support.v4.view.animation.FastOutSlowInInterpolator) View(android.view.View) ExitFragmentTransition(com.kogitune.activity_transition.fragment.ExitFragmentTransition) Nullable(android.support.annotation.Nullable)

Example 2 with ExitFragmentTransition

use of com.kogitune.activity_transition.fragment.ExitFragmentTransition in project PreLollipopTransition by takahirom.

the class EndFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_end, container, false);
    final ExitFragmentTransition exitFragmentTransition = FragmentTransition.with(this).interpolator(new LinearOutSlowInInterpolator()).to(v.findViewById(R.id.fragment_imageView)).start(savedInstanceState);
    exitFragmentTransition.exitListener(new AnimatorListenerAdapter() {

        @Override
        public void onAnimationStart(Animator animation) {
            Log.d("TAG", "onAnimationStart: ");
        }

        @Override
        public void onAnimationEnd(Animator animation) {
            Log.d("TAG", "onAnimationEnd: ");
        }
    }).interpolator(new FastOutSlowInInterpolator());
    exitFragmentTransition.startExitListening();
    return v;
}
Also used : LinearOutSlowInInterpolator(android.support.v4.view.animation.LinearOutSlowInInterpolator) Animator(android.animation.Animator) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter) FastOutSlowInInterpolator(android.support.v4.view.animation.FastOutSlowInInterpolator) View(android.view.View) ExitFragmentTransition(com.kogitune.activity_transition.fragment.ExitFragmentTransition)

Example 3 with ExitFragmentTransition

use of com.kogitune.activity_transition.fragment.ExitFragmentTransition in project PreLollipopTransition by takahirom.

the class SupportEndFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.support_fragment_end, container, false);
    final ExitFragmentTransition exitFragmentTransition = FragmentTransition.with(this).interpolator(new FastOutSlowInInterpolator()).to(v.findViewById(R.id.fragment_imageview)).start(savedInstanceState);
    exitFragmentTransition.startExitListening();
    return v;
}
Also used : FastOutSlowInInterpolator(android.support.v4.view.animation.FastOutSlowInInterpolator) View(android.view.View) ExitFragmentTransition(com.kogitune.activity_transition.fragment.ExitFragmentTransition)

Aggregations

FastOutSlowInInterpolator (android.support.v4.view.animation.FastOutSlowInInterpolator)3 View (android.view.View)3 ExitFragmentTransition (com.kogitune.activity_transition.fragment.ExitFragmentTransition)3 Animator (android.animation.Animator)2 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)2 LinearOutSlowInInterpolator (android.support.v4.view.animation.LinearOutSlowInInterpolator)2 Nullable (android.support.annotation.Nullable)1