bluelinelabs / bluelinelabs/Conductor

SharedElementTransitionChangeHandler ArrayMap on Lower APIs

Open
#535 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.9k
Forks
338
PR merge metrics
No merged PRs in 30d

Description

Hi

I tried to implement some shared element transition following your demo app. (line 128 of TransitionDemoController)
since the documentation suggests that the second `ControllerChangeHanlder` will be used if Api is lower than L.

But the problem is when we create an `ArcFadeMoveChangeHandlerCompat` we actually have to pass a `SharedElementTransitionChangeHandler` object.

this class is using ArrayMap to hold the transition names internally. `ArrayMap` was introduced in KitKat (and there is a compat version in support library).

so on devices running lower than KitKat it still crashes the app and the `ArcFadeMoveChangeHandlerCompat` can not take care of it.

suggestion:
1. replacing the ArrayMap with empty normal HashMap for lower APIs ad Keeping the ArrayMap for above 19.
2. adding support library as a dependency and use it for ArrayMap (not a good one).

(I can submit a PR for the fix if you agree with the first option)

Contributor guide

Open the contributing guide

Research direction

Start at line 128 of TransitionDemoController and trace how ArcFadeMoveChangeHandlerCompat creates or receives SharedElementTransitionChangeHandler. Check the ArrayMap usage on devices below KitKat, then verify that the lower-API transition no longer crashes while the documented fallback behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.