Java 类android.transition.ChangeTransform 实例源码

项目:AndroidGameofLife    文件:MainActivity.java   
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);
}
项目:unicorn    文件:ArcMoveTransitionHandler.java   
@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;
}
项目:AndroidWPTemplate    文件:AbsBaseActivity.java   
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);
    }
}
项目:Conductor-TransitionsEverywhere    文件:ArcFadeMoveChangeHandler.java   
@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;
}
项目:native-navigation    文件:FragmentSharedElementTransition.java   
public FragmentSharedElementTransition() {
  addTransition(new ChangeBounds());
  addTransition(new Fade());
  addTransition(new ChangeImageTransform());
  addTransition(new ChangeTransform());
  setInterpolator(new FastOutSlowInInterpolator());
}
项目:FunWithAndroid    文件:ImageTransition.java   
public ImageTransition() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds());
    addTransition(new ChangeTransform());
    addTransition(new ChangeImageTransform());
    setPathMotion(new ArcMotion());
}
项目:talk-android    文件:LinkStoryFragment.java   
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;
}
项目:talk-android    文件:FileStoryFragment.java   
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;
}
项目:talk-android    文件:TopicStoryFragment.java   
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;
}
项目:MVP-Sample    文件:ImageTransition.java   
public ImageTransition() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds());
    addTransition(new ChangeTransform());
    addTransition(new ChangeImageTransform());
    setPathMotion(new ArcMotion());
}
项目:Anecdote    文件:ImageTransitionSet.java   
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());

    super.addListener(this);
}
项目:UseCases    文件:DetailsTransition.java   
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public DetailsTransition() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds())
            .addTransition(new ChangeTransform())
            .addTransition(new ChangeImageTransform());
}
项目:android-permission-checker-app    文件:Transition.java   
private void init() {
  setOrdering(ORDERING_TOGETHER);
  addTransition(new ChangeBounds()).
      addTransition(new ChangeTransform()).
      addTransition(new ChangeImageTransform());
}
项目:GitHub    文件:DetailTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:Android-UtilCode    文件:DetailTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:WatchIt    文件:DetailsTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:AndroidUtilCode-master    文件:DetailTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:simple-stack    文件:DetailsTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:Music-Cover-View    文件:MusicCoverView.java   
private MorphTransition(int shape) {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new MusicCoverViewTransition(shape));
    addTransition(new ChangeImageTransform());
    addTransition(new ChangeTransform());
}
项目:AndroidUtilCode    文件:DetailTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:AutoMusicTagFixer    文件:DetailsTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:ForPDA    文件:DetailsTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:Fragmentation    文件:DetailTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:android101    文件:DetailTransition.java   
private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}
项目:NavigationFragment    文件:DetailTransition.java   
public DetailTransition() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds())
            .addTransition(new ChangeTransform())
            . addTransition(new ChangeImageTransform());
}
项目:polar-dashboard    文件:ViewerActivity.java   
private void setTransition() {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
    return;
  }

  final TransitionSet transition = new TransitionSet();

  ChangeBounds transition1 = new ChangeBounds();
  transition.addTransition(transition1);
  ChangeTransform transition2 = new ChangeTransform();
  transition.addTransition(transition2);
  ChangeClipBounds transition3 = new ChangeClipBounds();
  transition.addTransition(transition3);
  ChangeImageTransform transition4 = new ChangeImageTransform();
  transition.addTransition(transition4);

  transition.setDuration(SHARED_ELEMENT_TRANSITION_DURATION);

  FastOutSlowInInterpolator interpolator = new FastOutSlowInInterpolator();
  transition1.setInterpolator(interpolator);
  transition2.setInterpolator(interpolator);
  transition3.setInterpolator(interpolator);
  transition4.setInterpolator(interpolator);

  final GravityArcMotion pathMotion = new GravityArcMotion();
  transition.setPathMotion(pathMotion);

  getWindow().setSharedElementEnterTransition(transition);
  getWindow().setSharedElementReturnTransition(transition);
  getWindow().setSharedElementsUseOverlay(false);

  Slide slide = new Slide(Gravity.TOP);
  slide.setInterpolator(new LinearOutSlowInInterpolator());
  slide.addTarget(appBar);
  slide.setDuration(225);
  slide.setStartDelay(100);
  getWindow().setEnterTransition(slide);
  Slide slideOut = (Slide) slide.clone();
  slideOut.setInterpolator(new FastOutLinearInInterpolator());
  slideOut.setStartDelay(0);
  getWindow().setReturnTransition(slideOut);
}
项目:adt-leanback-support    文件:TransitionHelperApi21.java   
public static Object createScale() {
    return new ChangeTransform();
}
项目:wwmmo    文件:Transitions.java   
private void init() {
  setOrdering(ORDERING_TOGETHER);
  this.addTransition(new ChangeBounds())
      .addTransition(new ChangeTransform())
      .addTransition(new ChangeImageTransform());
}