List of usage examples for android.transition Fade Fade
public Fade()
From source file:com.bullmobi.message.ui.fragments.EasyNotificationFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Resources res = getResources(); mConfigWidgetPinDuration = res.getInteger(R.integer.config_maxPinTime); mConfigWidgetSelectDelay = res.getInteger(R.integer.config_iconSelectDelayMillis); ViewConfiguration vc = ViewConfiguration.get(getActivity()); mMaxFlingVelocity = vc.getScaledMaximumFlingVelocity(); mMinFlingVelocity = vc.getScaledMinimumFlingVelocity(); // Clock widget mClockWidget = new ClockWidget(this, this); // Media widget mMediaController = MediaController2.newInstance(getActivity()); mMediaWidget = new MediaWidget(this, this); // Transitions if (Device.hasKitKatApi()) { mTransitionJit = new TransitionSet().setOrdering(TransitionSet.ORDERING_TOGETHER) .addTransition(new Fade()).addTransition(new ChangeBounds()); mTransitionSwitchScene = new TransitionSet().setOrdering(TransitionSet.ORDERING_TOGETHER) .addTransition(new Fade(Fade.OUT).setDuration(200)) .addTransition(new Fade(Fade.IN).setStartDelay(80)) .addTransition(new ChangeBounds().setStartDelay(80)); }/*www . j av a 2s . co m*/ // Timeout mTimeout = isNotDemo() ? mActivityAcd.getTimeout() : new Timeout(); }
From source file:com.achep.acdisplay.ui.fragments.AcDisplayFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Resources res = getResources(); mConfigWidgetPinDuration = res.getInteger(R.integer.config_maxPinTime); mConfigWidgetSelectDelay = res.getInteger(R.integer.config_iconSelectDelayMillis); ViewConfiguration vc = ViewConfiguration.get(getActivity()); mMaxFlingVelocity = vc.getScaledMaximumFlingVelocity(); mMinFlingVelocity = vc.getScaledMinimumFlingVelocity(); // Clock widget mClockWidget = getConfig().isCustomWidgetEnabled() ? new HostWidget(this, this) : new ClockWidget(this, this); // Media widget mMediaController = MediaController2.newInstance(getActivity()).asyncWrap(); mMediaWidget = new MediaWidget(this, this); // Transitions if (Device.hasKitKatApi()) { mTransitionJit = new TransitionSet().setOrdering(TransitionSet.ORDERING_TOGETHER) .addTransition(new Fade()).addTransition(new ChangeBounds()); mTransitionSwitchScene = new TransitionSet().setOrdering(TransitionSet.ORDERING_TOGETHER) .addTransition(new Fade(Fade.OUT).setDuration(200)) .addTransition(new Fade(Fade.IN).setStartDelay(80)) .addTransition(new ChangeBounds().setStartDelay(80)); }/*from w w w. j a va2s. c om*/ // Timeout mTimeout = isNotDemo() ? mActivityAcd.getTimeout() : new Timeout(); }
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/*from w w w . j av a2s.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/*ww w .ja v a 2s .co 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 ww . ja va 2 s. com 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) { } }); }