Created
December 15, 2021 16:00
-
-
Save NinoDLC/8fc586f47f7c7689cad54c380db373f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = MeetingDetailActivity.navigate(this, meetingId); | |
Pair<View, String> imageViewPair = new Pair<>(imageView, imageView.getTransitionName()); | |
Pair<View, String> textViewPair = new Pair<>(textView, textView.getTransitionName()); | |
@SuppressWarnings("unchecked") | |
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation( | |
this, | |
imageViewPair, | |
textViewPair | |
); | |
startActivity(intent, options.toBundle()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
roomImageView.setTransitionName(getMeetingRoomTransitionName(meetingId)); | |
topicTextView.setTransitionName(getMeetingTopicTransitionName(meetingId)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<transitionSet | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<targets> | |
<target android:excludeId="@android:id/statusBarBackground" /> | |
<target android:excludeId="@android:id/navigationBarBackground" /> | |
<target android:excludeId="@id/appbarlayout" /> | |
</targets> | |
<autoTransition /> | |
</transitionSet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<transitionSet | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<targets> | |
<target android:excludeId="@android:id/statusBarBackground" /> | |
<target android:excludeId="@android:id/navigationBarBackground" /> | |
<target android:excludeId="@id/appbarlayout" /> | |
</targets> | |
<fade /> | |
</transitionSet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<transitionSet | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:startDelay="300"> | |
<targets> | |
<target android:excludeId="@android:id/statusBarBackground" /> | |
<target android:excludeId="@android:id/navigationBarBackground" /> | |
<target android:excludeId="@id/appbarlayout" /> | |
</targets> | |
<fade /> | |
</transitionSet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> | |
<!-- Customize your theme here. --> | |
<item name="colorPrimary">@color/colorPrimary</item> | |
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
<item name="colorAccent">@color/colorAccent</item> | |
<item name="windowActionBar">false</item> | |
<item name="windowNoTitle">true</item> | |
<!-- enable window content transitions (shared element transition) --> | |
<item name="android:windowActivityTransitions">true</item> | |
<item name="android:windowEnterTransition">@transition/fade_delay</item> | |
<item name="android:windowReenterTransition">@transition/fade_delay</item> | |
<item name="android:windowReturnTransition">@transition/fade</item> | |
<item name="android:windowExitTransition">@transition/fade</item> | |
<item name="android:windowSharedElementEnterTransition">@transition/autotransition</item> | |
<item name="android:windowSharedElementExitTransition">@transition/autotransition</item> | |
</style> | |
</resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment