android-transitions

Material Design parent-child navigational transition recyclerview entry to detail fragment

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 14:45:51
Background I am trying to implement the "parent-to-child" navigational transition specifically when you click a Recyclerview entry and the details appear in a fullscreen fragment. Something like this: Question How do I go about doing this with so many animation APIs available? (TransitionManager.beginDelayedTransition, SharedTransition, setExitTransition, etc) What I have tried InboxRecyclerView - This matches my requirements EXCEPT that it seems to only work when the detail view is in the same layout as the Recyclerview. Because I am navigating between fragments using the fragment backstack,

Shared Element transition bug from TextView to EditText

依然范特西╮ 提交于 2019-12-06 03:52:29
问题 I am trying to do an Android Shared Transtion between a TextView and a EditText´ but when showing the resulting Activity the text in the EditView have been shifted up. See attached pictures. Also, clicking on the EditView` after the transition will restore the text to the correct position. First clicking any row in RecylcerView: The cell view, the date TextEdit and the Name TextEdit are shared to the next activity. The cell background is transitioned into the toolbar. Start activity cell

Show a fragment with shared elements animation

独自空忆成欢 提交于 2019-12-05 22:41:21
In my app I have code like this: final FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.replace(R.id.fragment_container, fragment, "tag"); transaction.addSharedElement(view, "transitionName"); transaction.addToBackStack(null) .commit(); It works fine, shared elements animation works. But if I change this code like getSupportFragmentManager().beginTransaction() .add(R.id.fragment_container, fragment, "tag") .hide(fragment) .commit(); final FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.remove(oldFragment

ViewRootImpl.setPausedForTransition(boolean) NullPointerException in ActivityTransitionCoordinator when transition to other Activity invoked too early

て烟熏妆下的殇ゞ 提交于 2019-12-05 21:58:36
问题 In my Android app, I have a splash screen where I do some setup and loading. My app uses default explode as a windowEnterTransition and a windowExitTransition and a changeImageTransform plus changeBounds transition set as a windowSharedElementEnterTransition and windowSharedElementExitTransition . For convenience, I start the next Activity using a static method where I pass the current Activity as a Context and a shared element. The code is provided in the second part of this post. One of the

Content Transitions on Top of Shared Elements in android

眉间皱痕 提交于 2019-12-05 15:18:33
I am trying my hands with SharedElements and Content Transitions in Android. I was trying to combine Content Transitions and Shared Elements and create a particular animation, however I have encountered a problem. After the transition on Shared Elements (ImageView) end, I am using content Transitions to animate Text View into position using Slide Transition. However when the textViews are sliding from Bottom to their position on the top of image View, the text goes beneath the ImageView (Shared Element) and later just appears on the top of the ImageView. Is there a way to do this right? I am

Replacing fragments have wrong elevation value

*爱你&永不变心* 提交于 2019-12-05 11:08:38
问题 Hello again stack overflowians. I have another fragment question. (I'm using android.app.Fragment not Support Fragments) I'm trying to replace a fragment. But this isn't as simple as using: fragmentTransaction .replace(containerId, newFragment) .addToBackStack("unique tag") .commit() Why not? Good question friends, its because my newFragment has a transition animation. Where is the animation defined? Another great question, its defined in the fragments onCreateAnimator() Why is it defined

Animate image's saturation

风格不统一 提交于 2019-12-05 06:03:53
Is it possible to animate the saturation of an image (e.g. png) over time? For example from grayscale to full color. Plus if I can use an Interpolator. I have seen the EffectFactory and the ColorMatrix classes but I cannot combine them with an animation/transition. E.g. applying grayscale saturation on a Drawable drawable : ColorMatrix matrix = new ColorMatrix(); matrix.setSaturation(0); ColorMatrixColorFilter filter = new ColorMatrixColorFilter(matrix); drawable.setColorFilter(filter); and for full saturation later: matrix.setSaturation(1); For anyone interested my full solution based on

Shared element transition - animate only the visible part of the shared view

纵然是瞬间 提交于 2019-12-05 03:42:47
I'm working in an app that is similar to Google Calendar... There are events and when a user click one, the event grows and transforms into the detail view. The shared views (the events) are inside a ScrollView, so at some point those views may be partially visible. The problem is that when one partially visible View is selected, the full View appears above all and then the animation runs. Here is a capture of the problem: What can I do to make the Transition take only the visible part of the View to animate it? This is my transition: <changeBounds xmlns:android="http://schemas.android.com/apk

How can one know if an activity is started without a transition?

廉价感情. 提交于 2019-12-04 16:17:56
问题 I have a use case where I mostly start an activity with a transition, but that's not the case when opening it from the navigation drawer. To keep the transition smooth I have a Transition.TransitionListener in which I trigger some UI updating when the transition is done. So I have something like this: public class SomeActivity extends Activity { public void onCreate(Bundle savedInstanceState){ // ... if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { Transition

Shared Element transition bug from TextView to EditText

ぃ、小莉子 提交于 2019-12-04 07:40:40
I am trying to do an Android Shared Transtion between a TextView and a EditText´ but when showing the resulting Activity the text in the EditView have been shifted up. See attached pictures. Also, clicking on the EditView` after the transition will restore the text to the correct position. First clicking any row in RecylcerView: The cell view, the date TextEdit and the Name TextEdit are shared to the next activity. The cell background is transitioned into the toolbar. Start activity cell layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk