By passing in false
, we say that we do not want to attach our View
to the root ViewGroup
just yet. We are saying that it will happen at some other point in time. In this example, the other point in time is simply the addView()
method used immediately below inflation.
Also we need to pass in the parent ViewGroup
if we want the child xml width and height to be honored. Visit Source for further explanation.