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
<item name="windowEnterTransition">@transition/fade</item> | |
<item name="windowSharedElementEnterTransition">@transition/move</item> | |
<item name="windowSharedElementExitTransition">@transition/move</item> |
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
<style name="AppTheme.Main"> | |
<item name="android:windowExitTransition">@transition/main_exit</item> | |
<item name="android:windowReenterTransition">@transition/main_reenter</item> | |
</style> |
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
<explode xmlns:android="http://schemas.android.com/apk/res/android"> | |
<targets> | |
<target android:excludeId="@android:id/statusBarBackground"/> | |
<target android:excludeId="@android:id/navigationBarBackground"/> | |
</targets> | |
</explode> |
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
<slide xmlns:android="http://schemas.android.com/apk/res/android" android:slideEdge="top"> | |
<targets> | |
<target android:excludeId="@android:id/statusBarBackground"/> | |
<target android:excludeId="@android:id/navigationBarBackground"/> | |
</targets> | |
</slide> |
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
<style name="AppTheme.Detail"> | |
<item name="android:windowAllowEnterTransitionOverlap">false</item> | |
<item name="android:windowEnterTransition">@transition/detail_enter</item> | |
</style> |
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
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android" android:transitionOrdering="together"> | |
<slide android:slideEdge="bottom"> | |
<targets> | |
<target android:targetId="@id/cardview"/> | |
</targets> | |
</slide> | |
<fade> | |
<targets> | |
<target android:excludeId="@android:id/statusBarBackground"/> | |
<target android:excludeId="@android:id/navigationBarBackground"/> |
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
<style name="AppTheme.Sharing"> | |
<item name="android:windowSharedElementEnterTransition"> | |
@transition/sharing_shared_element_enter | |
</item> | |
</style> |
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
public void pictureClick(View view) { | |
// Create an object containing information about our scene transition animation | |
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this, view, getString(R.string.picture_transition_name)); | |
PictureView pictureView = (PictureView) view; | |
int picture = pictureView.getImageResource(); | |
CharSequence title = view.getContentDescription(); | |
// Pass information to DetailActivity in order to show the chosen image and its details | |
Intent intent = new Intent(this, DetailActivity.class); | |
intent.putExtra(DetailActivity.EXTRA_PICTURE, picture); | |
intent.putExtra(DetailActivity.EXTRA_TITLE, title); |
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
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_detail); | |
setSupportActionBar((Toolbar) findViewById(R.id.toolbar)); | |
int picture = getIntent().getExtras().getInt(EXTRA_PICTURE); | |
CharSequence title = getIntent().getExtras().getCharSequence(EXTRA_TITLE); | |
CollapsingToolbarLayout collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar); | |
collapsingToolbarLayout.setTitle(title); |
OlderNewer