-3

Hey I'm new to android can someone please explain me What does it mean to inflate a view from an xml file in little detail.

As I'm trying to show some data on RecyclerView from an arraylist.

Andrew Brēza
  • 7,705
  • 3
  • 34
  • 40

1 Answers1

0

Instantiates a layout XML file into its corresponding View objects. It is never used directly. Instead, use getLayoutInflater() or getSystemService(Class) to retrieve a standard LayoutInflater instance that is already hooked up to the current context and correctly configured for the device you are running on. For example:

LayoutInflater inflater = (LayoutInflater)context.getSystemService
  (Context.LAYOUT_INFLATER_SERVICE);

official documentation here

Devendra Singh
  • 2,343
  • 4
  • 26
  • 47