Search in sources :

Example 6 with Visibility

use of android.transition.Visibility in project Material-Animations by lgvalle.

the class TransitionActivity1 method setupWindowAnimations.

private void setupWindowAnimations() {
    Visibility enterTransition = buildEnterTransition();
    getWindow().setEnterTransition(enterTransition);
}
Also used : Visibility(android.transition.Visibility)

Example 7 with Visibility

use of android.transition.Visibility in project platform_frameworks_base by android.

the class ActivityTransitionCoordinator method noLayoutSuppressionForVisibilityTransitions.

/**
     * Blocks suppressLayout from Visibility transitions. It is ok to suppress the layout,
     * but we don't want to force the layout when suppressLayout becomes false. This leads
     * to visual glitches.
     */
private static void noLayoutSuppressionForVisibilityTransitions(Transition transition) {
    if (transition instanceof Visibility) {
        final Visibility visibility = (Visibility) transition;
        visibility.setSuppressLayout(false);
    } else if (transition instanceof TransitionSet) {
        final TransitionSet set = (TransitionSet) transition;
        final int count = set.getTransitionCount();
        for (int i = 0; i < count; i++) {
            noLayoutSuppressionForVisibilityTransitions(set.getTransitionAt(i));
        }
    }
}
Also used : TransitionSet(android.transition.TransitionSet) Visibility(android.transition.Visibility)

Example 8 with Visibility

use of android.transition.Visibility in project android_frameworks_base by AOSPA.

the class ActivityTransitionCoordinator method noLayoutSuppressionForVisibilityTransitions.

/**
     * Blocks suppressLayout from Visibility transitions. It is ok to suppress the layout,
     * but we don't want to force the layout when suppressLayout becomes false. This leads
     * to visual glitches.
     */
private static void noLayoutSuppressionForVisibilityTransitions(Transition transition) {
    if (transition instanceof Visibility) {
        final Visibility visibility = (Visibility) transition;
        visibility.setSuppressLayout(false);
    } else if (transition instanceof TransitionSet) {
        final TransitionSet set = (TransitionSet) transition;
        final int count = set.getTransitionCount();
        for (int i = 0; i < count; i++) {
            noLayoutSuppressionForVisibilityTransitions(set.getTransitionAt(i));
        }
    }
}
Also used : TransitionSet(android.transition.TransitionSet) Visibility(android.transition.Visibility)

Aggregations

Visibility (android.transition.Visibility)8 TransitionSet (android.transition.TransitionSet)5 Intent (android.content.Intent)1 Slide (android.transition.Slide)1 View (android.view.View)1