mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
2eca8411a3
To be honest, I'm not sure why this works. onSizeChanged seems to be a callback to notify the user that your layout has completed and not a place to update layout params. However, it makes *slightly* more sense that you could update your children's layout from this view, which is what this patch changes the code to do. I think I could figure out why this works if I dug further into [1] but I have other things to focus on. I don't think this is the most correct solution, but it is likely the smallest and least risky change we can make to fix this issue, which is ideal because we'd like to uplift this to the 57 Beta. A more correct solution would override the Activity Stream RecyclerView and provide different desired measurements to its parent so that the new size is set *during* layout rather than after it, which would make the layout process more efficient. However, this type of code is less commonly written day-to-day by developers so it's harder to write, harder to maintain, and I'd have to read a lot of [1] in order to write it. :) [1]: https://developer.android.com/guide/topics/ui/how-android-draws.html MozReview-Commit-ID: AceUvDYGWCR --HG-- extra : rebase_source : 5fe014388db8e4186c2cda54a453930bf8eed211 |
||
---|---|---|
.. | ||
android | ||
locales |