Questions tagged [activity-transition]

Activity transitions in material design apps provide visual connections between different states through motion and transformations between common elements. You can specify custom animations for enter and exit transitions and for transitions of shared elements between activities.

Activity transitions in material design apps provide visual connections between different states through motion and transformations between common elements. You can specify custom animations for enter and exit transitions and for transitions of shared elements between activities.

Android 5.0 (API level 21) supports these enter and exit transitions:

  • explode - Moves views in or out from the center of the scene.
  • slide - Moves views in or out from one of the edges of the scene.
  • fade - Adds or removes a view from the scene by changing its opacity.

Android 5.0 (API level 21) also supports these shared elements transitions:

  • changeBounds - Animates the changes in layout bounds of target views.
  • changeClipBounds - Animates the changes in clip bounds of target views.
  • changeTransform - Animates the changes in scale and rotation of target views.
  • changeImageTransform - Animates changes in size and scale of target images.
102 questions
134
votes
9 answers

How do I prevent the status bar and navigation bar from animating during an activity scene animation transition?

Firstly, my status bar background is set to dark brown, and my navigation bar background is default black. I'm using the Material light theme. I'm starting a new activity using ActivityOptions.makeSceneTransitionAnimation with default transitions,…
49
votes
2 answers

Crash in Activity Transitions with SharedElement

I'm using Activity transitions from a ViewPager (in the calling activity) with a shared element and content transitions as well. I'm getting this crash when re-entering to the calling activity: java.lang.NullPointerException: Attempt to invoke…
45
votes
1 answer

FEATURE_ACTIVITY_TRANSITIONS vs. FEATURE_CONTENT_TRANSITIONS

I am having some trouble understanding the difference between these two Window flags and am not 100% certain when each needs to be used and why. The docs for Window.FEATURE_ACTIVITY_TRANSITIONS say: Enables Activities to run Activity Transitions…
Alex Lockwood
  • 83,063
  • 39
  • 206
  • 250
38
votes
12 answers

Shared element activity transition on android 5

I wanted to setup a shared element transition when going from one Activity to another. The first Activity has a RecyclerView with items. When an item is clicked that item should animate to the new activity. So i've set a …
33
votes
4 answers

Are Activity/Fragment Transitions compatible with pre-Lollipop devices?

I'm trying to make an Activity Transition using Shared Elements on a pre-Lollipop device (4.x). Is it possible? So far, I'm trying this: public class RewardDetail extends ActionBarActivity { @Override public void onCreate(final Bundle…
32
votes
2 answers

android 5 activity transition on lower api

Every time i search i came across this " android 5(L) activity transition only available on API >= 21 . that's fine but i can see some app like QuickPic and google inbox that use similar transition and also working on lower api, so how this app can…
mehdok
  • 1,499
  • 4
  • 29
  • 54
28
votes
2 answers

ViewPager Fragments – Shared Element Transitions

An app I'm developing displays a grid of images. When you tap an image, it goes into the details view. The details view contains a ViewPager that allows you swipe between every image in the grid. This is done by passing a lists of paths (containing…
25
votes
5 answers

How can I scale textviews using shared element transitions?

I am able to get TextViews to transition perfectly between two activities using ActivityOptions.makeSceneTransitionAnimation. However I want to make the text scale up as it transitions. I can see the material design example scaling up the text…
24
votes
2 answers

Activity Transition error, cannot resolve symbol '@transition/explode'

I am trying out Activity Transitions and when I paste below code in my values-21/styles.xml I get error: cannot resolve symbol '@transition/explode'