Questions tagged [shared-element-transition]

A shared elements transition determines how views that are shared between two activities transition between these activities.

A shared elements transition determines how views that are shared between two activities transition between these activities.

https://developer.android.com/training/material/animations.html

435 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,…
65
votes
13 answers

Blinking screen on image transition between activities

I implemented an image transition between two activities using the new shared elements from lollipop. It's working but I get a weird white blinking on the entire screen during the transition and I can't find how to get rid of it. Here is an…
Leguman
  • 2,104
  • 1
  • 18
  • 22
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
44
votes
3 answers

Fragment shared element transition with add() instead of replace()?

I am trying to make a shared element transition between fragments, everything works fine when using replace() to add the second fragment, however in the codebase add() is used a lot, but when using that, transition just skips to end values Is it…
urSus
  • 12,492
  • 12
  • 69
  • 89
39
votes
5 answers

How to know when Shared Element Transition ends

I am working with Shared Element Transitions between activities. The transition is working fine but I want to know when the shared element transition ends so that I can show other things. I tried using onSharedElementEnd in SharedElementCallback in…
tyczj
  • 71,600
  • 54
  • 194
  • 296
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 Shared Element Transition: Transforming an ImageView from a circle to a rectangle and back again

I'm trying to do a shared element transition between two activities. The first activity has a circle imageview and the second activity has a rectangular imageview. I just want the circle to transition from the first activity to the second activity…
Simon
  • 19,658
  • 27
  • 149
  • 217
32
votes
2 answers

CollapsingToolbarLayout title as a shared element transition

I have a TextView in my activity A. How can I make shared element transition of TextView from activity A and a title of CollapsingToolbarLayout.setTitle() from activity B? Is there way to obtain its title view id from CollapsingToolbarLayout's…
31
votes
6 answers

Android - Shared element transitions with calling activity finish()

I'm working on making an application more Material and I'm just stuck on how to implement some shared element transitions. I have an activity A that starts another B and then calls finish() in order to remove it from the back stack. In my case I…
29
votes
3 answers

shared element transition works with FragmentTransaction.replace() but doesn't work with FragmentTransaction.add()

The new Shared Element Transitions works when i use Fragment 'replace' but i can't seem to make it work fragment 'add'. I use the same container in both the cases. More details: Activity - layout->
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…
21
votes
1 answer

Android lollipop shared elements transition blink / flash

I see strange thing in my shared element transition on Lollipop. Shared elements are flickering just before they are starting to animate (please see video https://www.youtube.com/watch?v=DCoyyC_S-9A) I've no idea why it is happening. However when I…
1
2 3
28 29