bluelinelabs / bluelinelabs/Conductor
Shared element transitions don't work if transition names don't match
- Dominant language
- Java
- Stars
- 3.9k
- Forks
- 338
- PR merge metrics
- No merged PRs in 30d
Description
`SharedElementTransitionChangeHandler` has a method `addSharedElement(String fromName, String toName)` to allow shared transitions without matching the names. This is useful when you use those shared transitions more than once.
The change handler uses these two methods to replace the `transitionName` property of the views, but it seems currently the name reset is executed before the transition starts so they seem to be doing nothing:
```java
setNameOverrides(container, toSharedElements);
scheduleNameReset(container, toSharedElements);
```
If the name reset is moved to the `onTransitionStart` of `overallTransition` (without scheduling with `OneShotPreDrawListener`) then it seems to work, but I'm not sure this is the correct approach.
Contributor guide
Research direction
Start in SharedElementTransitionChangeHandler at addSharedElement(String fromName, String toName), then trace setNameOverrides, scheduleNameReset, and overallTransition. Reproduce a shared transition with different names and verify that the transition starts with the intended names and completes without leaving incorrect transitionName values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100