Search in sources :

Example 1 with Fade

use of android.support.transition.Fade in project samourai-wallet-android by Samourai-Wallet.

the class SendTransactionDetailsView method showTransaction.

public void showTransaction() {
    TransitionSet set = new TransitionSet();
    set.setOrdering(TransitionSet.ORDERING_TOGETHER);
    set.addTransition(new Fade()).addTarget(transactionReview).addTransition(new Slide(Gravity.START)).addTarget(transactionView);
    TransitionManager.beginDelayedTransition(this, set);
    addView(transactionView);
    reviewActive = false;
    removeView(transactionReview);
}
Also used : TransitionSet(android.support.transition.TransitionSet) Slide(android.support.transition.Slide) Fade(android.support.transition.Fade)

Example 2 with Fade

use of android.support.transition.Fade in project Memento-Calendar by alexstyl.

the class SearchTransitioner method onActivityResumed.

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
void onActivityResumed() {
    if (supportsTransitions()) {
        TransitionManager.beginDelayedTransition(toolbar, FadeInTransition.createTransition());
        FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) toolbar.getLayoutParams();
        layoutParams.setMargins(toolbarMargin, toolbarMargin, toolbarMargin, toolbarMargin);
        viewFader.showContent(toolbar);
        toolbar.setLayoutParams(layoutParams);
        TransitionManager.beginDelayedTransition(activityContent, new Fade(Fade.IN));
        activityContent.setVisibility(VISIBLE);
        ViewCompat.setElevation(toolbarHolder, 0);
    }
}
Also used : FrameLayout(android.widget.FrameLayout) Fade(android.support.transition.Fade) TargetApi(android.annotation.TargetApi)

Example 3 with Fade

use of android.support.transition.Fade in project Memento-Calendar by alexstyl.

the class SearchActivity method exitTransitionWithAction.

private void exitTransitionWithAction(final Runnable endingAction) {
    Transition transition = FadeOutTransition.withAction(new SimpleTransitionListener() {

        @Override
        public void onTransitionEnd(Transition transition) {
            endingAction.run();
        }
    });
    TransitionManager.beginDelayedTransition(searchbar, transition);
    fader.hideContentOf(searchbar);
    TransitionManager.beginDelayedTransition(content, new Fade(Fade.OUT));
}
Also used : FadeOutTransition(com.alexstyl.specialdates.transition.FadeOutTransition) FadeInTransition(com.alexstyl.specialdates.transition.FadeInTransition) Transition(android.support.transition.Transition) SimpleTransitionListener(com.alexstyl.specialdates.transition.SimpleTransitionListener) Fade(android.support.transition.Fade)

Example 4 with Fade

use of android.support.transition.Fade in project samourai-wallet-android by Samourai-Wallet.

the class SendTransactionDetailsView method showReview.

/**
 * Shows review layout with transition
 *
 * @param ricochet will be used to show and hide ricochet hops slider
 */
public void showReview(boolean ricochet) {
    TransitionSet set = new TransitionSet();
    set.setOrdering(TransitionSet.ORDERING_TOGETHER);
    set.addTransition(new Fade()).addTarget(transactionView).addTransition(new Slide(Gravity.END)).addTarget(transactionReview);
    // 
    // if (ricochet) {
    // //            ricochetHopsReview.setVisibility(View.VISIBLE);
    // stoneWallReview.setVisibility(View.GONE);
    // } else {
    // ricochetHopsReview.setVisibility(View.GONE);
    // stoneWallReview.setVisibility(View.VISIBLE);
    // }
    TransitionManager.beginDelayedTransition(this, set);
    addView(transactionReview);
    reviewActive = true;
    removeView(transactionView);
}
Also used : TransitionSet(android.support.transition.TransitionSet) Slide(android.support.transition.Slide) Fade(android.support.transition.Fade)

Example 5 with Fade

use of android.support.transition.Fade in project Memento-Calendar by alexstyl.

the class SearchTransitioner method transitionToSearch.

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
void transitionToSearch() {
    if (transitioning) {
        return;
    }
    if (supportsTransitions()) {
        Transition transition = FadeOutTransition.withAction(navigateToSearchWhenDone());
        TransitionManager.beginDelayedTransition(toolbar, transition);
        ViewCompat.setElevation(toolbarHolder, activity.getResources().getDimensionPixelSize(R.dimen.toolbar_elevation));
        expandToolbar();
        viewFader.hideContentOf(toolbar);
        TransitionManager.beginDelayedTransition(activityContent, new Fade(Fade.OUT));
        activityContent.setVisibility(GONE);
    } else {
        navigator.toSearch(activity);
    }
}
Also used : FadeInTransition(com.alexstyl.specialdates.transition.FadeInTransition) FadeOutTransition(com.alexstyl.specialdates.transition.FadeOutTransition) Transition(android.support.transition.Transition) Fade(android.support.transition.Fade) TargetApi(android.annotation.TargetApi)

Aggregations

Fade (android.support.transition.Fade)5 TargetApi (android.annotation.TargetApi)2 Slide (android.support.transition.Slide)2 Transition (android.support.transition.Transition)2 TransitionSet (android.support.transition.TransitionSet)2 FadeInTransition (com.alexstyl.specialdates.transition.FadeInTransition)2 FadeOutTransition (com.alexstyl.specialdates.transition.FadeOutTransition)2 FrameLayout (android.widget.FrameLayout)1 SimpleTransitionListener (com.alexstyl.specialdates.transition.SimpleTransitionListener)1