shared-element-transition

Delay shared element transition to complete statelist animation

亡梦爱人 提交于 2019-12-02 08:38:58
问题 I've been trying out shared element transition on Lollipop. i have a recyclerview which loads some cards and one click the card expands to its details in the next activity. I have set a ripple effect and a StateListAnimator on the card. But those are not visible cause the transition starts before these effects are completed. Is there any way to delay the transition so that it can wait for the statelist animator and ripple to complete? Here is the code I use ActivityOptions options = null; if

Delay shared element transition to complete statelist animation

ⅰ亾dé卋堺 提交于 2019-12-02 04:35:17
I've been trying out shared element transition on Lollipop. i have a recyclerview which loads some cards and one click the card expands to its details in the next activity. I have set a ripple effect and a StateListAnimator on the card. But those are not visible cause the transition starts before these effects are completed. Is there any way to delay the transition so that it can wait for the statelist animator and ripple to complete? Here is the code I use ActivityOptions options = null; if (Utilities.isLollipop()) { options = ActivityOptions.makeSceneTransitionAnimation(this, Pair.create

Why Fade transition doesn't work on Shared Element

落爺英雄遲暮 提交于 2019-12-01 09:17:00
I have 2 Activities , the Shared Element transition works fine. ChangeBounds is the only the transition applied. I want to apply a fade transition while the shared element moves, so the ordering is ORDERING_TOGETHER. public class TransitionUtils { public static Transition makeSharedElementEnterTransition(final Context context, final long duration) { TransitionSet set = new TransitionSet(); set.setOrdering(TransitionSet.ORDERING_TOGETHER); set.setDuration(duration); Transition changeBounds = new ChangeBounds(); changeBounds.addTarget(context.getString(R.string.transition_name_search_text)); set

Why Fade transition doesn't work on Shared Element

江枫思渺然 提交于 2019-12-01 05:38:51
问题 I have 2 Activities , the Shared Element transition works fine. ChangeBounds is the only the transition applied. I want to apply a fade transition while the shared element moves, so the ordering is ORDERING_TOGETHER. public class TransitionUtils { public static Transition makeSharedElementEnterTransition(final Context context, final long duration) { TransitionSet set = new TransitionSet(); set.setOrdering(TransitionSet.ORDERING_TOGETHER); set.setDuration(duration); Transition changeBounds =

How to implement shared transition element form RcyclerView's item to Fragment with Android Navigation Component?

假如想象 提交于 2019-12-01 05:26:56
I have a pretty straightforward case. I want to implement shared element transition between item in RececlerView and fragment . I'm using android navigation component in my app. There is an article about shared transition on developer.android and topic on stackoverflow but this solution works only for view that located in fragment layout that starts transition and doesn't work for items from RecyclerView . Also there is a lib on github but i don't want to rely on 3rd party libs and do it by myself. Is there some solution for this? Maybe it should work and this is just a bug? But I haven't

Android - Shared element transitions with calling activity finish()

六月ゝ 毕业季﹏ 提交于 2019-11-30 16:56:46
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 have an element I want to share between the two activities, but once it is passed from A to B, A no longer matters. If I don't call finish() after startActivity(ctx,intent, bundle) the exit/enter animation works perfectly. However, if I do call finish, there's a really ugly flicker before the animation starts. Is there something I'm overlooking or is

Glitch when animating nested views in a shared element Activity transition?

可紊 提交于 2019-11-30 09:12:23
I've been messing around with the new APIs in Android 5.0 and have been trying to figure out whether or not it is possible to animate both a ViewGroup and one of its children separately as shared elements during an Activity transition . The screenshots below gives a simplified example of what I am trying to achieve: In the first activity, the dark gray box is a ViewGroup centered in the screen and the red box is its child View (the layout XML code I am using can be found here ). When the user clicks on the dark gray box, the dark gray box should gradually scale up to fill the second activity's

Android reverse shared element transition on back after orientation change?

百般思念 提交于 2019-11-30 09:03:28
For shared element transition I am following this github project. It has 2 screens - one with recyclerview having number of cards & second the detail screen. As expected, it exhibits shared element transition of imageview & textview from recyclerview item to detail screen & reverse transition on back press. But, if user changes orientation on detail screen, & then presses back button then the reverse transition animation doesn't work. Looking at this video's frames between 2:49 to 2:57 it seems to be possible even after orientation change. Any idea on this? Edit: Please check this video for

Android lollipop shared elements transition blink / flash

∥☆過路亽.° 提交于 2019-11-30 08:22:46
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 add <item name="android:windowSharedElementsUseOverlay">false</item> to my theme I don't see flickering but the transition is not looking good (they look like only half of it is animating second half of animation 'hidden'). Other transition settings: <item name="android:windowActivityTransitions">true</item> <item name="android

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

纵然是瞬间 提交于 2019-11-30 04:41:56
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-> <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#00ffff" android:orientation="vertical" > </FrameLayout> On launch of the Activity, I add Fragment1 to the screen getFragmentManager().beginTransaction().replace(R.id