Hi all,
Taking a quick scan at our layout inflations, we often do something like this:
inflater.inflate(R.layout.my_layout, null);
In general, this is bad; a parent should be specified instead of null.
This article does a good job of explaining it:
http://www.doubleencore.com/2013/05/layout-inflation-as-intended/
TL;DR version: If you want to inflate a layout without attaching it,
use "inflater.inflate(R.layout.my_layout, parent, false)" instead of
giving null in the 2-arg version of inflate(). A null parent causes
LayoutParams to be thrown away, and should only be used in cases where
there is no root (e.g., inflating an AlertDialog view).
Brian
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev