Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed shared element transition. The onMeasure() function was fitting…
… the image to the view by adding a runnable to the message queue. It did this to avoid calculating the image size multiple times as onMeasure() is typically called multiple times. However, when using a shared element transition, the snapshot was always taken before the message queue reached this runnable, so at the time of snapshot, the image size was always 0. This caused the image to shrink until it was gone, and then reappear after a new touch event. I overrode onSizeChanged(), which immediately after the last onMeasure() is called, and moved the content of the runnable to this function. It now works perfectly. Fingers crossed.
- Loading branch information