Commit b9d70d3
committed
[Motion] Fix zero-length motion path container transform bug.
getPosTan, which calculates the translation of the conatienr bounds, no-ops if the startView doesn't move to a new position (when the startView and endView are top aligned and centered horizontally on one another). This was causing motionPathPositions, the int array holding the x and y of the animated bounds to never be initialized, defaulting to 0, and throwing off the bounds calculation.
This CL updates the int array with actual default x and y values so when getPosTan no-ops, the motionPathPosition array contains the correct values.
Resolves #1161
PiperOrigin-RevId: 319247326
(cherry picked from commit 3c9096d)1 parent 47ab850 commit b9d70d3
File tree
2 files changed
+12
-0
lines changed- lib/java/com/google/android/material/transition
- platform
2 files changed
+12
-0
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 1141 | | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1142 | 1148 | | |
1143 | 1149 | | |
1144 | 1150 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
1147 | 1153 | | |
1148 | 1154 | | |
1149 | 1155 | | |
| |||
0 commit comments