Passing null for root studio gives me this warning:
Avoid passing null as the view root (need to resolve layout parameters on the inflated layout\'s r
A nice information I found while looking for a way to solve this.According to Dave Smith,
Layout inflation is the term used within the context of Android to indicate when an XML layout resource is parsed and converted into a hierarchy of View objects.
The ViewGroup
been asked for here as part of the inflate method parameters is used to inherit higher level styling.While passing null can seem harmless, it can actually cause serious problems for your app later on. Read more about this here.