android.transition.ChangeImageTransform Java Examples
The following examples show how to use
android.transition.ChangeImageTransform.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Simple1Fragment.java From YcShareElement with Apache License 2.0 | 6 votes |
@Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); final View imgView = view.findViewById(R.id.s1_img); imgView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { TransitionSet simple2Transition = new TransitionSet(); simple2Transition.addTransition(new ChangeImageTransform()); simple2Transition.addTransition(new ChangeBounds()); Simple2Fragment simple2Fragment = new Simple2Fragment(); simple2Fragment.setSharedElementEnterTransition(simple2Transition); simple2Fragment.setSharedElementReturnTransition(simple2Transition); FragmentTransaction fragmentTransaction = getActivity().getSupportFragmentManager().beginTransaction(); fragmentTransaction.addSharedElement(imgView, imgView.getTransitionName()); fragmentTransaction.replace(R.id.simple_container, simple2Fragment, "simple2"); fragmentTransaction.addToBackStack("simple2"); fragmentTransaction.commit(); } }); }
Example #2
Source File: DefaultShareElementTransitionFactory.java From YcShareElement with Apache License 2.0 | 6 votes |
protected TransitionSet buildShareElementsTransition(List<View> shareViewList) { TransitionSet transitionSet = new TransitionSet(); if (shareViewList == null || shareViewList.size() == 0) { return transitionSet; } transitionSet.addTransition(new ChangeClipBounds()); transitionSet.addTransition(new ChangeTransform()); transitionSet.addTransition(new ChangeBounds()); transitionSet.addTransition(new ChangeTextTransition()); if (mUseDefaultImageTransform) { transitionSet.addTransition(new ChangeImageTransform()); } else { transitionSet.addTransition(new ChangeOnlineImageTransition()); } return transitionSet; }
Example #3
Source File: CoverActivity.java From GyroscopeImageDemo with Apache License 2.0 | 6 votes |
/** * 模拟入场动画 */ private void runEnterAnim() { getScreenSize(); mIvCover.post(new Runnable() { @Override public void run() { FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(mScreenWidth, mScreenHeight); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ChangeImageTransform changeImageTransform = new ChangeImageTransform(); AutoTransition autoTransition = new AutoTransition(); changeImageTransform.setDuration(TRANSITIONS_DURATION); autoTransition.setDuration(TRANSITIONS_DURATION); TransitionSet transitionSet = new TransitionSet(); transitionSet.addTransition(autoTransition); transitionSet.addTransition(changeImageTransform); TransitionManager.beginDelayedTransition(mTransitionsContainer, transitionSet); mIvCover.setLayoutParams(params); mIvCover.setScaleType(ImageView.ScaleType.CENTER_CROP); } else { mIvCover.setLayoutParams(params); mIvCover.setScaleType(ImageView.ScaleType.CENTER_CROP); } } }); }
Example #4
Source File: FragmentSharedElementTransition.java From native-navigation with MIT License | 5 votes |
public FragmentSharedElementTransition() { addTransition(new ChangeBounds()); addTransition(new Fade()); addTransition(new ChangeImageTransform()); addTransition(new ChangeTransform()); setInterpolator(new FastOutSlowInInterpolator()); }
Example #5
Source File: AutoSharedElementCallback.java From native-navigation with MIT License | 5 votes |
@TargetApi(TARGET_API) private Transition getDefaultTransition() { TransitionSet set = new TransitionSet(); set.addTransition(new ChangeBounds()); set.addTransition(new Fade()); set.addTransition(new ChangeImageTransform()); set.setInterpolator(new FastOutSlowInInterpolator()); return set; }
Example #6
Source File: ImageTransitionSet.java From Anecdote with Apache License 2.0 | 5 votes |
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void init() { setOrdering(ORDERING_TOGETHER); addTransition(new ChangeBounds()). addTransition(new ChangeTransform()). addTransition(new ChangeImageTransform()); super.addListener(this); }
Example #7
Source File: DetailsTransition.java From AndroidNavigation with MIT License | 4 votes |
private void init() { setOrdering(ORDERING_TOGETHER); addTransition(new ChangeBounds()). addTransition(new ChangeTransform()). addTransition(new ChangeImageTransform()); }
Example #8
Source File: Transition.java From android-permission-checker-app with Apache License 2.0 | 4 votes |
private void init() { setOrdering(ORDERING_TOGETHER); addTransition(new ChangeBounds()). addTransition(new ChangeTransform()). addTransition(new ChangeImageTransform()); }
Example #9
Source File: DetailTransition.java From Android-UtilCode with Apache License 2.0 | 4 votes |
private void init() { setOrdering(ORDERING_TOGETHER); addTransition(new ChangeBounds()). addTransition(new ChangeTransform()). addTransition(new ChangeImageTransform()); }
Example #10
Source File: DetailsTransition.java From simple-stack with Apache License 2.0 | 4 votes |
private void init() { setOrdering(ORDERING_TOGETHER); addTransition(new ChangeBounds()). addTransition(new ChangeTransform()). addTransition(new ChangeImageTransform()); }
Example #11
Source File: MusicCoverView.java From Music-Cover-View with Apache License 2.0 | 4 votes |
private MorphTransition(int shape) { setOrdering(ORDERING_TOGETHER); addTransition(new MusicCoverViewTransition(shape)); addTransition(new ChangeImageTransform()); addTransition(new ChangeTransform()); }
Example #12
Source File: DetailsTransition.java From ForPDA with GNU General Public License v3.0 | 4 votes |
private void init() { setOrdering(ORDERING_TOGETHER); addTransition(new ChangeBounds()). addTransition(new ChangeTransform()). addTransition(new ChangeImageTransform()); }