Title: feat(android): allow shared element transition to work with ListView/CollectionView/Pager by farfromrefug · Pull Request #10411 · NativeScript/NativeScript · GitHub
Open Graph Title: feat(android): allow shared element transition to work with ListView/CollectionView/Pager by farfromrefug · Pull Request #10411 · NativeScript/NativeScript
X Title: feat(android): allow shared element transition to work with ListView/CollectionView/Pager by farfromrefug · Pull Request #10411 · NativeScript/NativeScript
Description: In the current implementation it would not work because the collectionview would not have time to realize the cells which you would want to use as shared element. The idea is to defer a bit for : the page to be loaded a timeout giving time to the collectionview to realize its "cells". In most my case the 0 timeout was enough, though for some reason i did not find yet it requires just a bit more with the pager. So what i did is make the timeout a parameter of the PageTransition so that each use case can be handled. A few notes : i left the old commented code for now to be able to compare presenting and presented can not be "compared" anymore. We cant filter on intersection. Though it is not a big deal. Android handles that on its own. i am starting to think it would be best for PageTransition constructor parameters to be an object. Would be less messy, though it would be a breaking change. But as it is quite a new feature, would that be acceptable? in my fork the PageTransition has a onTransitionEnd which revert setTransitionName to null for all presenting views. The reason is that my fork uses add for fragments instead of replace. Thus back navigation fragments are still existing. And if you use the same setTransitionName for multiple pages in deep navigation it would fail/crash. I did not add it here as it is unecessary. Just a note for the future!
Open Graph Description: In the current implementation it would not work because the collectionview would not have time to realize the cells which you would want to use as shared element. The idea is to defer a bit for : ...
X Description: In the current implementation it would not work because the collectionview would not have time to realize the cells which you would want to use as shared element. The idea is to defer a bit for : ...
Opengraph URL: https://github.com/NativeScript/NativeScript/pull/10411
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a3d75c72-8c4d-f6a8-a0c3-8a3563ed7dd9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D602:EEDB7:E38CB1:12C499A:6A5BBFB6 |
| html-safe-nonce | d3b095ceae5c696919b340a34e5a89b7a8254db229af2f9e47d489b9b82ba14c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjAyOkVFREI3OkUzOENCMToxMkM0OTlBOjZBNUJCRkI2IiwidmlzaXRvcl9pZCI6IjQ1MzU1MjMyNzkyNTI0NzE3MzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e1d023d332cbe8719c9ffe6006f1b7e8d903872089f3b4b0a7cae282fcf491be |
| hovercard-subject-tag | pull_request:1557972459 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/NativeScript/NativeScript/pull/10411/files |
| twitter:image | https://avatars.githubusercontent.com/u/655344?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/655344?s=400&v=4 |
| og:image:alt | In the current implementation it would not work because the collectionview would not have time to realize the cells which you would want to use as shared element. The idea is to defer a bit for : ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width