shared-element-transition

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

旧街凉风 提交于 2019-11-30 04:19:29
问题 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

Shared Element Transition on CardView with radius

隐身守侯 提交于 2019-11-30 03:59:55
I've been working on this problem for weeks and I'm still unable to solve this problem. So, I have a CardView that contains a LinearLayout with an ImageView. Without that radius Shared Element Transition works seamlessly. However, when I add radius (app:cardCornerRadius="25dp") to that CardView, the Shared Element Transition looks ugly because it remove the radius first and then start the animation . 1st Approach: ObjectAnimator I create ObjectAnimator to animate the radius value on card, and after the animation end it start the transition. ObjectAnimator animator = ObjectAnimator .ofFloat

Understanding exit/reenter shared element transitions

可紊 提交于 2019-11-30 02:05:00
I'm doing some rudimentary exploration of Shared Element Transitions in Android L. The simple example I've setup has an image view translating from the top of the screen to the bottom of the screen during activity transitions and I've extended the transition duration so I can see things working. I've hit two problems so far trying to understand how Shared Element Transitions works. 1)When using only Enter/Return transitions (Exit/Reenter set to null). The enter transition is fine, but when the back button is pressed the view animates for a time, stops, then reappear in the final position.

Android - Shared element transitions with calling activity finish()

假如想象 提交于 2019-11-30 00:13:40
问题 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

Android reverse shared element transition on back after orientation change?

让人想犯罪 __ 提交于 2019-11-29 13:05:05
问题 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

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

时间秒杀一切 提交于 2019-11-29 02:29:35
问题 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

Hiccups in activity transitions with shared elements

倖福魔咒の 提交于 2019-11-29 02:22:14
I want to use the new Activity Transitions of Android Lollipop. But currently I am seeing very weird hickups during the animations. I hacked together the smallest sample I could think of. This is what I did in a very short version: Enabled window content transitions in my styles.xml Referenced a very simple slide.xml as exit transition in my style Provided a android:transitionName for a shared element in both layouts Called ActivityOptions.makeSceneTransitionAnimation() with that name and the view I want to share Passed the resulting bundle to startActivity() This is the behavior I see (try

Shared Element Transition on CardView with radius

你离开我真会死。 提交于 2019-11-28 23:12:23
问题 I've been working on this problem for weeks and I'm still unable to solve this problem. So, I have a CardView that contains a LinearLayout with an ImageView. Without that radius Shared Element Transition works seamlessly. However, when I add radius (app:cardCornerRadius="25dp") to that CardView, the Shared Element Transition looks ugly because it remove the radius first and then start the animation . 1st Approach: ObjectAnimator I create ObjectAnimator to animate the radius value on card, and

Understanding exit/reenter shared element transitions

我的未来我决定 提交于 2019-11-28 22:58:48
问题 I'm doing some rudimentary exploration of Shared Element Transitions in Android L. The simple example I've setup has an image view translating from the top of the screen to the bottom of the screen during activity transitions and I've extended the transition duration so I can see things working. I've hit two problems so far trying to understand how Shared Element Transitions works. 1)When using only Enter/Return transitions (Exit/Reenter set to null). The enter transition is fine, but when

How to know when Shared Element Transition ends

烈酒焚心 提交于 2019-11-28 21:10:53
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 the activity I am transition to but that gets called before the transition starts. is there another callback i can listen for? Did you try to bind animation listener to the shared element view inside onMapSharedElements ? ViewCompat.animate(view) will give you either a new or cached ViewPropertyAnimator(Compat) and then binding the animation