本文整理汇总了Java中android.support.transition.TransitionSet.addTransition方法的典型用法代码示例。如果您正苦于以下问题:Java TransitionSet.addTransition方法的具体用法?Java TransitionSet.addTransition怎么用?Java TransitionSet.addTransition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.transition.TransitionSet
的用法示例。
在下文中一共展示了TransitionSet.addTransition方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hideWithFadeView
import android.support.transition.TransitionSet; //导入方法依赖的package包/类
public static void hideWithFadeView(boolean on, ViewGroup rootView, View view) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
Fade fade = new Fade();
fade.setDuration(500);
ChangeBounds changeBounds = new ChangeBounds();
changeBounds.setDuration(500);
TransitionSet transitionSet = new TransitionSet();
transitionSet.addTransition(fade);
transitionSet.addTransition(changeBounds);
transitionSet.setOrdering(TransitionSet.ORDERING_TOGETHER);
TransitionManager.beginDelayedTransition(rootView, transitionSet);
}
view.setVisibility(on ? View.GONE : View.VISIBLE);
}
示例2: goneSlidingTabs
import android.support.transition.TransitionSet; //导入方法依赖的package包/类
private void goneSlidingTabs(boolean on) {
if (!isInvisible) {
Fade fade = new Fade();
fade.setDuration(500);
ChangeBounds changeBounds = new ChangeBounds();
changeBounds.setDuration(500);
TransitionSet transitionSet = new TransitionSet();
transitionSet.addTransition(fade);
transitionSet.addTransition(changeBounds);
transitionSet.setOrdering(TransitionSet.ORDERING_TOGETHER);
TransitionManager.beginDelayedTransition(getBinding().root, transitionSet);
getBinding().slidingTabs.setVisibility(on ? View.GONE : View.VISIBLE);
}
}
示例3: addTransitionToStaggeredTransition
import android.support.transition.TransitionSet; //导入方法依赖的package包/类
@VisibleForTesting
final void addTransitionToStaggeredTransition(Transition basePartialTransition,
TransitionSet staggeredTransition,
int viewId, int indexInTransition) {
Transition partialTransition =
applyStaggeredTransitionParams(basePartialTransition, viewId, indexInTransition);
staggeredTransition.addTransition(partialTransition);
}