use of android.support.transition.Transition 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));
}
use of android.support.transition.Transition 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) {
}
});
}
use of android.support.transition.Transition 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);
}
}
Aggregations