当前位置: 首页>>代码示例>>Java>>正文


Java AutoTransition类代码示例

本文整理汇总了Java中android.transition.AutoTransition的典型用法代码示例。如果您正苦于以下问题:Java AutoTransition类的具体用法?Java AutoTransition怎么用?Java AutoTransition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AutoTransition类属于android.transition包,在下文中一共展示了AutoTransition类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: tryDelayed

import android.transition.AutoTransition; //导入依赖的package包/类
/**
 * {@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);
    }
}
 
开发者ID:pushbit,项目名称:sprockets-android,代码行数:24,代码来源:Transitions.java

示例2: updateLinkText

import android.transition.AutoTransition; //导入依赖的package包/类
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);
}
 
开发者ID:rumaan,项目名称:file.io-app,代码行数:12,代码来源:MainActivity.java

示例3: BottomNavigationAnimationHelperKitkat

import android.transition.AutoTransition; //导入依赖的package包/类
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);
}
 
开发者ID:Trumeet,项目名称:MiPushFramework,代码行数:9,代码来源:BottomNavigationAnimationHelperKitkat.java

示例4: DribbbleCommentsAdapter

import android.transition.AutoTransition; //导入依赖的package包/类
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));
    }
}
 
开发者ID:goodev,项目名称:materialup,代码行数:11,代码来源:PostActivity.java

示例5: onCreate

import android.transition.AutoTransition; //导入依赖的package包/类
@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)));
}
 
开发者ID:evant,项目名称:PokeMVVM,代码行数:10,代码来源:PokemonFragment.java

示例6: DribbbleCommentsAdapter

import android.transition.AutoTransition; //导入依赖的package包/类
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));
}
 
开发者ID:liulinbo,项目名称:Amumu,代码行数:8,代码来源:DribbbleShot.java

示例7: onChangeCheese

import android.transition.AutoTransition; //导入依赖的package包/类
@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());
}
 
开发者ID:mobvoi,项目名称:ticdesign,代码行数:13,代码来源:ContentActivity.java

示例8: withAction

import android.transition.AutoTransition; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:alexstyl,项目名称:Material-SearchTransition,代码行数:11,代码来源:FadeOutTransition.java

示例9: createTransition

import android.transition.AutoTransition; //导入依赖的package包/类
public static Transition createTransition() {
    AutoTransition transition = new AutoTransition();
    transition.setDuration(FADE_IN_DURATION);
    return transition;
}
 
开发者ID:alexstyl,项目名称:Material-SearchTransition,代码行数:6,代码来源:FadeInTransition.java

示例10: withAction

import android.transition.AutoTransition; //导入依赖的package包/类
public static Transition withAction(TransitionListener finishingAction) {
    AutoTransition transition = new AutoTransition();
    transition.setDuration(FADE_OUT_DURATION);
    transition.addListener(finishingAction);
    return transition;
}
 
开发者ID:sorcererXW,项目名称:SorceryIconPack,代码行数:7,代码来源:FadeOutTransition.java

示例11: createAutoTransition

import android.transition.AutoTransition; //导入依赖的package包/类
static Object createAutoTransition() {
    return new AutoTransition();
}
 
开发者ID:kingargyle,项目名称:adt-leanback-support,代码行数:4,代码来源:TransitionHelperKitkat.java

示例12: onCreateView

import android.transition.AutoTransition; //导入依赖的package包/类
@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;

    }
 
开发者ID:RealAndyLawton,项目名称:BreakMeOffKitKat,代码行数:44,代码来源:TransitionsXmlFragment.java


注:本文中的android.transition.AutoTransition类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。