Java Code Examples for android.transition.AutoTransition#setDuration()
The following examples show how to use
android.transition.AutoTransition#setDuration() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContactDetailActivity.java From CrazyDaily with Apache License 2.0 | 5 votes |
private void initTransition() { Window window = getWindow(); TransitionSet set = new TransitionSet(); AutoTransition autoTransition = new AutoTransition(); autoTransition.excludeTarget(R.id.ic_head, true); autoTransition.addTarget(R.id.tx_name); autoTransition.addTarget(R.id.ic_location); autoTransition.addTarget(R.id.tx_location); autoTransition.setDuration(600); autoTransition.setInterpolator(new DecelerateInterpolator()); set.addTransition(autoTransition); BezierTransition bezierTransition = new BezierTransition(); bezierTransition.addTarget(R.id.ic_head); bezierTransition.excludeTarget(R.id.tx_name, true); bezierTransition.excludeTarget(R.id.ic_location, true); bezierTransition.excludeTarget(R.id.tx_location, true); bezierTransition.setDuration(600); bezierTransition.setInterpolator(new DecelerateInterpolator()); set.addTransition(bezierTransition); CircularRevealTransition transition = new CircularRevealTransition(); transition.excludeTarget(android.R.id.statusBarBackground, true); window.setEnterTransition(transition); window.setReenterTransition(transition); window.setReturnTransition(transition); window.setExitTransition(transition); window.setSharedElementEnterTransition(set); window.setSharedElementReturnTransition(set); }
Example 2
Source File: BottomNavigationAnimationHelperKitkat.java From MiPushFramework with GNU General Public License v3.0 | 5 votes |
BottomNavigationAnimationHelperKitkat() { mSet = new AutoTransition(); mSet.setOrdering(TransitionSet.ORDERING_TOGETHER); mSet.setDuration(ACTIVE_ANIMATION_DURATION_MS); mSet.setInterpolator(new FastOutSlowInInterpolator()); TextScale textScale = new TextScale(); mSet.addTransition(textScale); }
Example 3
Source File: PostActivity.java From materialup with Apache License 2.0 | 5 votes |
public DribbbleCommentsAdapter(Context context, int resource, List<Comment> comments) { super(context, resource, comments); inflater = LayoutInflater.from(context); if (UI.isLollipop()) { change = new AutoTransition(); change.setDuration(200L); change.setInterpolator(AnimationUtils.loadInterpolator(context, android.R.interpolator.fast_out_slow_in)); } }
Example 4
Source File: FadeOutTransition.java From Material-SearchTransition with MIT License | 5 votes |
/** * Creates a AutoTransition that calls the {@linkplain android.transition.Transition.TransitionListener#onTransitionEnd(Transition)} * of the passing Listener when complete */ public static Transition withAction(TransitionListener finishingAction) { AutoTransition transition = new AutoTransition(); transition.setDuration(FADE_OUT_DURATION); transition.addListener(finishingAction); return transition; }
Example 5
Source File: FadeInTransition.java From Material-SearchTransition with MIT License | 4 votes |
public static Transition createTransition() { AutoTransition transition = new AutoTransition(); transition.setDuration(FADE_IN_DURATION); return transition; }