gecko-dev/mobile
Michael Comella 2eca8411a3 Bug 1399683: Change padding of content view rather than self in onSizeChanged. r=sebastian
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
2017-09-21 15:40:55 -07:00
..
android Bug 1399683: Change padding of content view rather than self in onSizeChanged. r=sebastian 2017-09-21 15:40:55 -07:00
locales Bug 1394462 - Update dnsNotFound error copy and illustration. r=nhnt11 2017-09-19 21:54:29 +02:00