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


Java ChangeTransform类代码示例

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


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

示例1: startTransition

import android.transition.ChangeTransform; //导入依赖的package包/类
private void startTransition(){
    lifeGridFragment = LifeGridFragment.newInstance();
    FragmentManager fragmentManager = getSupportFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    if(Build.VERSION.SDK_INT >= 21) {
        TransitionSet gridTransition = new TransitionSet();
        gridTransition.setDuration(600);
        gridTransition.addTransition(new ChangeBounds());
        gridTransition.addTransition((new ChangeTransform()));
        lifeGridFragment.setSharedElementEnterTransition(gridTransition);
    }


    fragmentTransaction.addSharedElement(findViewById(R.id.intro_card_view), getString(R.string.card_view_transition_name));
    fragmentTransaction.replace(R.id.container, lifeGridFragment);
    fragmentTransaction.addToBackStack(null);
    fragmentTransaction.commit();
    appBarLayout.setExpanded(false, true);
}
 
开发者ID:lewismcgeary,项目名称:AndroidGameofLife,代码行数:20,代码来源:MainActivity.java

示例2: createTransition

import android.transition.ChangeTransform; //导入依赖的package包/类
@NonNull
@Override
protected Transition createTransition(@NonNull ViewGroup container, @NonNull View entering, @Nullable View leaving, boolean push) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
    return new TransitionSet()
        .setOrdering(ORDERING_TOGETHER)
        .addTransition(new Fade(Fade.OUT))
        .addTransition(new Fade(Fade.IN));
  }
  final TransitionSet transition = new TransitionSet()
      .addTransition(new ChangeBounds())
      .addTransition(new ChangeClipBounds())
      .addTransition(new ChangeTransform());

  transition.setPathMotion(new ArcMotion());

  return transition;
}
 
开发者ID:SiimKinks,项目名称:unicorn,代码行数:19,代码来源:ArcMoveTransitionHandler.java

示例3: initAnimation

import android.transition.ChangeTransform; //导入依赖的package包/类
private void initAnimation() {
    if (Build.VERSION.SDK_INT >= 21) {
        //To enable window content transitions in your code instead, call the Window.requestFeature() method:
        getWindow().requestFeature(android.view.Window.FEATURE_CONTENT_TRANSITIONS);
        Transition ts_enter = new ChangeImageTransform();  //Slide(); //Explode();
        Transition ts_exit = new ChangeTransform();

        ts_enter.setDuration(400);
        ts_exit.setDuration(400);
    /*
    If you have set an enter transition for the second activity,
    the transition is also activated when the activity starts.
    */
        getWindow().setEnterTransition(ts_enter);
        getWindow().setExitTransition(ts_exit);
    }
}
 
开发者ID:murielK,项目名称:AndroidWPTemplate,代码行数:18,代码来源:AbsBaseActivity.java

示例4: getTransition

import android.transition.ChangeTransform; //导入依赖的package包/类
@Override
@NonNull
protected Transition getTransition(@NonNull ViewGroup container, View from, View to, boolean isPush) {
    TransitionSet transition = new TransitionSet()
            .setOrdering(TransitionSet.ORDERING_SEQUENTIAL)
            .addTransition(new Fade(Fade.OUT))
            .addTransition(new TransitionSet().addTransition(new ChangeBounds()).addTransition(new ChangeClipBounds()).addTransition(new ChangeTransform()))
            .addTransition(new Fade(Fade.IN));

    transition.setPathMotion(new ArcMotion());

    return transition;
}
 
开发者ID:zawadz88,项目名称:Conductor-TransitionsEverywhere,代码行数:14,代码来源:ArcFadeMoveChangeHandler.java

示例5: FragmentSharedElementTransition

import android.transition.ChangeTransform; //导入依赖的package包/类
public FragmentSharedElementTransition() {
  addTransition(new ChangeBounds());
  addTransition(new Fade());
  addTransition(new ChangeImageTransform());
  addTransition(new ChangeTransform());
  setInterpolator(new FastOutSlowInInterpolator());
}
 
开发者ID:airbnb,项目名称:native-navigation,代码行数:8,代码来源:FragmentSharedElementTransition.java

示例6: ImageTransition

import android.transition.ChangeTransform; //导入依赖的package包/类
public ImageTransition() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds());
    addTransition(new ChangeTransform());
    addTransition(new ChangeImageTransform());
    setPathMotion(new ArcMotion());
}
 
开发者ID:fzymek,项目名称:FunWithAndroid,代码行数:8,代码来源:ImageTransition.java

示例7: getInstance

import android.transition.ChangeTransform; //导入依赖的package包/类
static public LinkStoryFragment getInstance(Story story, boolean isExpanded) {
    LinkStoryFragment f = new LinkStoryFragment();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            f.setSharedElementEnterTransition(new ChangeTransform());
        }
        f.setSharedElementEnterTransition(new ChangeBounds());
    }
    Bundle bundle = new Bundle();
    bundle.putBoolean("isExpanded", isExpanded);
    bundle.putParcelable("story", Parcels.wrap(story));
    f.setArguments(bundle);
    return f;
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:15,代码来源:LinkStoryFragment.java

示例8: getInstance

import android.transition.ChangeTransform; //导入依赖的package包/类
static public FileStoryFragment getInstance(Story story, boolean isExpanded) {
    FileStoryFragment f = new FileStoryFragment();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            f.setSharedElementEnterTransition(new ChangeTransform());
        }
        f.setSharedElementEnterTransition(new ChangeBounds());
    }
    Bundle bundle = new Bundle();
    bundle.putBoolean("isExpanded", isExpanded);
    bundle.putParcelable("story", Parcels.wrap(story));
    f.setArguments(bundle);
    return f;
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:15,代码来源:FileStoryFragment.java

示例9: getInstance

import android.transition.ChangeTransform; //导入依赖的package包/类
static public TopicStoryFragment getInstance(Story story, boolean isExpanded) {
    TopicStoryFragment f = new TopicStoryFragment();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            f.setSharedElementEnterTransition(new ChangeTransform());
        }
        f.setSharedElementEnterTransition(new ChangeBounds());
    }
    Bundle bundle = new Bundle();
    bundle.putBoolean("isExpanded", isExpanded);
    bundle.putParcelable("story", Parcels.wrap(story));
    f.setArguments(bundle);
    return f;
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:15,代码来源:TopicStoryFragment.java

示例10: init

import android.transition.ChangeTransform; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());

    super.addListener(this);
}
 
开发者ID:HugoGresse,项目名称:Anecdote,代码行数:10,代码来源:ImageTransitionSet.java

示例11: DetailsTransition

import android.transition.ChangeTransform; //导入依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public DetailsTransition() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds())
            .addTransition(new ChangeTransform())
            .addTransition(new ChangeImageTransform());
}
 
开发者ID:Zeyad-37,项目名称:UseCases,代码行数:8,代码来源:DetailsTransition.java

示例12: init

import android.transition.ChangeTransform; //导入依赖的package包/类
private void init() {
  setOrdering(ORDERING_TOGETHER);
  addTransition(new ChangeBounds()).
      addTransition(new ChangeTransform()).
      addTransition(new ChangeImageTransform());
}
 
开发者ID:Arjun-sna,项目名称:android-permission-checker-app,代码行数:7,代码来源:Transition.java

示例13: init

import android.transition.ChangeTransform; //导入依赖的package包/类
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:DetailTransition.java

示例14: MorphTransition

import android.transition.ChangeTransform; //导入依赖的package包/类
private MorphTransition(int shape) {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new MusicCoverViewTransition(shape));
    addTransition(new ChangeImageTransform());
    addTransition(new ChangeTransform());
}
 
开发者ID:andremion,项目名称:Music-Cover-View,代码行数:7,代码来源:MusicCoverView.java

示例15: DetailTransition

import android.transition.ChangeTransform; //导入依赖的package包/类
public DetailTransition() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds())
            .addTransition(new ChangeTransform())
            . addTransition(new ChangeImageTransform());
}
 
开发者ID:DMCApps,项目名称:NavigationFragment,代码行数:7,代码来源:DetailTransition.java


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