The layout-inflater tag refers to the Android LayoutInflater class which is used to build a view hierarchy from an xml layout file.
The LayoutInflater
class will build a view hierarchy from the XML layout, taking care of instantiating the views and setting them with the attributes values present in that layout file. This class can't be used directly, instead a reference to a valid LayoutInflater
object can be obtained by using one of the methods of the Activity
class or by getting it from the system services.
The usage of the LayoutInflater
is simple: just use one of the inflate()
methods and provide it the id of the XML layout file (in the form of R.layout.layout_file
) along with other desired parameters. More information can be found in the documentation of the class.