Java 类android.transition.AutoTransition 实例源码

项目:sprockets-android    文件:Transitions.java   
/**
 * {@link TransitionManager#beginDelayedTransition(ViewGroup) Begin a delayed transition} if
 * one is not already running.
 */
@UiThread
public static void tryDelayed(ViewGroup sceneRoot) {
    if (!sceneRoot.isLaidOut()) { // transition won't run
        return;
    }
    if (sDelayedTransition == null) {
        sDelayedTransition = new AutoTransition().addListener(new SimpleTransitionListener() {
            @Override
            public void onTransitionEnd(Transition transition) {
                super.onTransitionEnd(transition);
                sDelayedTransitionRunning = false;
            }
        });
    }
    if (!sDelayedTransitionRunning) {
        sDelayedTransitionRunning = true;
        TransitionManager.beginDelayedTransition(sceneRoot, sDelayedTransition);
    }
}
项目:file.io-app    文件:MainActivity.java   
void updateLinkText(String link) {
    linkTextView.setText(link);

    Transition transition = new AutoTransition()
            .setDuration(500)
            .setStartDelay(300)
            .setInterpolator(new AccelerateDecelerateInterpolator());
    TransitionManager.beginDelayedTransition(rootView, transition);

    linkTextView.setVisibility(View.VISIBLE);
}
项目:MiPushFramework    文件:BottomNavigationAnimationHelperKitkat.java   
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);
}
项目:materialup    文件:PostActivity.java   
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));
    }
}
项目:PokeMVVM    文件:PokemonFragment.java   
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setSharedElementEnterTransition(new AutoTransition());
    // Because we are loading things async, these are really just for exit animations.
    setEnterTransition(new TransitionSet()
            .addTransition(new AnchorAppBarSlide(R.id.app_bar).addTarget(R.id.types))
            .addTransition(new SlideDownAndFadeOut().addTarget(R.id.content)));
}
项目:Amumu    文件:DribbbleShot.java   
public DribbbleCommentsAdapter(Context context, int resource, List<Comment> comments) {
    super(context, resource, comments);
    inflater = LayoutInflater.from(context);
    change = new AutoTransition();
    change.setDuration(200L);
    change.setInterpolator(getFastOutSlowInInterpolator(context));
}
项目:ticdesign    文件:ContentActivity.java   
@SuppressWarnings("unused")
@OnClick(R.id.image_avatar)
protected void onChangeCheese() {
    int iconRes = Cheeses.getRandomCheeseDrawable();
    String titleString = Cheeses.getRandomCheeseString();

    TransitionManager.beginDelayedTransition(layoutContainer, new AutoTransition());

    imageAvatar.setImageResource(iconRes);
    textTitle.setText(titleString);
    colorize(((BitmapDrawable) imageAvatar.getDrawable()).getBitmap());
}
项目:OldDriver-master    文件:DribbbleShot.java   
public DribbbleCommentsAdapter(Context context, int resource, List<Comment> comments) {
    super(context, resource, comments);
    inflater = LayoutInflater.from(context);
    change = new AutoTransition();
    change.setDuration(200L);
    change.setInterpolator(getFastOutSlowInInterpolator(context));
}
项目:Material-SearchTransition    文件:FadeOutTransition.java   
/**
 * 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;
}
项目:Material-SearchTransition    文件:FadeInTransition.java   
public static Transition createTransition() {
    AutoTransition transition = new AutoTransition();
    transition.setDuration(FADE_IN_DURATION);
    return transition;
}
项目:SorceryIconPack    文件:FadeOutTransition.java   
public static Transition withAction(TransitionListener finishingAction) {
    AutoTransition transition = new AutoTransition();
    transition.setDuration(FADE_OUT_DURATION);
    transition.addListener(finishingAction);
    return transition;
}
项目:SorceryIconPack    文件:FadeInTransition.java   
public static Transition createTransition() {
    AutoTransition transition = new AutoTransition();
    transition.setDuration(FADE_IN_DURATION);
    return transition;
}
项目:adt-leanback-support    文件:TransitionHelperKitkat.java   
static Object createAutoTransition() {
    return new AutoTransition();
}
项目:BreakMeOffKitKat    文件:TransitionsXmlFragment.java   
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.transitions_xml_frag, null);
        ButterKnife.inject(this, view);

        mSceneRoot = ButterKnife.findById(view, R.id.transitions_xml_scene_root);

        // Inflate some scenes directly from XML
        mScene1 = Scene.getSceneForLayout(mSceneRoot, R.layout.transition_xml_scene1, getActivity());
        mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.transition_xml_scene2, getActivity());

        // Create a Scene from a ViewGroup that already exists
        LinearLayout scene3Layout =
            (LinearLayout) inflater.inflate(R.layout.transition_xml_scene3, null);
        mScene3 = new Scene(mSceneRoot, scene3Layout);

        // Can modify Scene 3's underlying behavior by adding a click listener
        scene3Layout.findViewById(R.id.transition_xml_btn).setOnClickListener(new View.OnClickListener() {
            @Override public void onClick(View v) {
                Toast.makeText(getActivity(), "Android Levl=100", Toast.LENGTH_SHORT).show();
            }
        });

        mTransitionManager = new TransitionManager();
        mTransitionManager.setTransition(
            mScene1,
            mScene2,
            new ChangeBounds()
        );
        mTransitionManager.setTransition(
            mScene2,
            mScene1,
            new Fade()
        );
        mTransitionManager.setTransition(
            mScene2,
            mScene3,
            new AutoTransition()
        );

        return view;

    }