shared-element-transition

In Transition when Fragment Shared Element Transitions happen sometimes captureEndValues does not get called and endValues return null?

家住魔仙堡 提交于 2021-02-11 12:41:45
问题 I wrote a transtion that extends androidx.transition.Transtion which rotates view from start value to end value, this just an example it happens with other classes that extends Transition. It works fine if i use TransitionManager.beginDelayedTransition() if i use the start and end values as arguments instead of endTransitionValues. class CustomRotationTransition : Transition { private var startRotation: Float = 0f private var endRotation: Float = 0f var forceValues: Boolean = false

Failed to retrieve removeGhost method

不羁岁月 提交于 2021-02-07 12:52:25
问题 I'm putting in place the Android Navigation Component in my app. Some transitions work fine, but for this one I have an error. The transition view, from fragment A, stay on the new fragment (B) and hide some elements. Moreover, when I scroll in the fragment, the view don't scroll with it. This is the error I get: W/t.qoqa.ui.debu: Accessing hidden method Landroid/view/GhostView;->removeGhost(Landroid/view/View;)V (greylist-max-p, reflection, denied) I/GhostViewApi21: Failed to retrieve

Shared Element Transition when reopening existing Activity in stack Reorder To Front

天大地大妈咪最大 提交于 2021-01-27 04:29:08
问题 I have an Activity A from there I open Activity B, and pass the shared element to it. It animates the transition fine, but when I go back to Activity A and then go to Activity B again which is still in the stack using intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); The shared element transition is not run. With regular animations you call overridePendingTransition() in onNewIntent for the animations to run. https://stackoverflow.com/a/8327091 I tried calling

Android shared element transition between different scaleType

匆匆过客 提交于 2020-06-26 06:00:42
问题 I followed this article of android develop blog, and here is his source code. The demo works well, however generally we prefer using centerCrop scale type in image list, and using fitCenter in detail mode. When I modify the code to achieve this, transition can't deal with the change of scale type. When back from detail fragemnt, the animation starts with wrong scale type. I found the ChangeImageTransform transition. The document says: This Transition captures an ImageView's matrix before and

Android shared element transition between different scaleType

£可爱£侵袭症+ 提交于 2020-06-26 06:00:13
问题 I followed this article of android develop blog, and here is his source code. The demo works well, however generally we prefer using centerCrop scale type in image list, and using fitCenter in detail mode. When I modify the code to achieve this, transition can't deal with the change of scale type. When back from detail fragemnt, the animation starts with wrong scale type. I found the ChangeImageTransform transition. The document says: This Transition captures an ImageView's matrix before and

Fragment shared element transition not working in nested views

萝らか妹 提交于 2020-01-17 02:32:12
问题 I have a strange problem (maybe it's a bug in transitions library) with shared element transition animations. Target Android version is 5.0 . Here is my layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/root_layout"> <RelativeLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height=

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

只愿长相守 提交于 2020-01-10 10:17:19
问题 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