Search in sources :

Example 1 with TransitionSet

use of android.support.transition.TransitionSet 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 TransitionSet

use of android.support.transition.TransitionSet in project weiui by kuaifan.

the class BottomNavigationViewEx method addAnimationListener.

private void addAnimationListener() {
    /**
     * 1. BottomNavigationMenuView mMenuView
     * 2. private final BottomNavigationAnimationHelperBase mAnimationHelper;
     * 3. private final TransitionSet mSet;
     */
    BottomNavigationMenuView mMenuView = getBottomNavigationMenuView();
    Object mAnimationHelper = getField(mMenuView.getClass(), mMenuView, "mAnimationHelper");
    TransitionSet mSet = getField(mAnimationHelper.getClass(), mAnimationHelper, "mSet");
    mSet.addListener(new Transition.TransitionListener() {

        @Override
        public void onTransitionStart(@NonNull Transition transition) {
        }

        @Override
        public void onTransitionEnd(@NonNull Transition transition) {
            refreshTextViewVisibility();
        }

        @Override
        public void onTransitionCancel(@NonNull Transition transition) {
            refreshTextViewVisibility();
        }

        @Override
        public void onTransitionPause(@NonNull Transition transition) {
        }

        @Override
        public void onTransitionResume(@NonNull Transition transition) {
        }
    });
}
Also used : TransitionSet(android.support.transition.TransitionSet) Transition(android.support.transition.Transition) BottomNavigationMenuView(android.support.design.internal.BottomNavigationMenuView)

Example 3 with TransitionSet

use of android.support.transition.TransitionSet 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)

Aggregations

TransitionSet (android.support.transition.TransitionSet)3 Fade (android.support.transition.Fade)2 Slide (android.support.transition.Slide)2 BottomNavigationMenuView (android.support.design.internal.BottomNavigationMenuView)1 Transition (android.support.transition.Transition)1