List of usage examples for android.transition Fade setDuration
public Transition setDuration(long duration)
From source file:org.huxizhijian.hhcomicviewer.ui.entry.ComicDetailsActivity.java
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void setupEnterAnimations() { Fade enterTransition = new Fade(); // getWindow().setEnterTransition(enterTransition); enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_medium));// enterTransition.addListener(new Transition.TransitionListener() { @Override/* ww w .ja v a 2 s.c o m*/ public void onTransitionStart(Transition transition) { transition.removeListener(this); animateRevealShow(mBinding.appBarComicDetails);//toolbar } @Override public void onTransitionEnd(Transition transition) { } @Override public void onTransitionCancel(Transition transition) { } @Override public void onTransitionPause(Transition transition) { } @Override public void onTransitionResume(Transition transition) { } }); }
From source file:org.huxizhijian.hhcomicviewer.ui.entry.ComicDetailsActivity.java
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void setupExitAnimations() { Fade returnTransition = new Fade(); // getWindow().setReturnTransition(returnTransition); returnTransition.setDuration(getResources().getInteger(R.integer.anim_duration_medium));// returnTransition.addListener(new Transition.TransitionListener() { @Override//from w w w . j a va 2 s. c o m public void onTransitionStart(Transition transition) { //? transition.removeListener(this); mBinding.FABComicDetails.setVisibility(View.INVISIBLE); } @Override public void onTransitionEnd(Transition transition) { } @Override public void onTransitionCancel(Transition transition) { } @Override public void onTransitionPause(Transition transition) { } @Override public void onTransitionResume(Transition transition) { } }); }
From source file:com.zertinteractive.wallpaper.MainActivity.java
@SuppressWarnings("NewApi") private void setupExitAnimations() { Fade returnTransition = new Fade(); getWindow().setReturnTransition(returnTransition); returnTransition.setDuration(getResources().getInteger(R.integer.anim_duration_medium)); returnTransition.setStartDelay(getResources().getInteger(R.integer.anim_duration_medium)); returnTransition.addListener(new Transition.TransitionListener() { @Override//from w w w . j av a 2 s .co m public void onTransitionStart(Transition transition) { transition.removeListener(this); animateButtonsOut(); animateRevealHide(recyclerView); } @Override public void onTransitionEnd(Transition transition) { } @Override public void onTransitionCancel(Transition transition) { } @Override public void onTransitionPause(Transition transition) { } @Override public void onTransitionResume(Transition transition) { } }); }