How to define inflation in Android

Hi I'm trying to learn Android, and I don't understand what Inflate really does; I saw various examples on which it is used to insert a layout inside another, but I'm not sure where it is good to use. Can anyone help with some good examples?

Thank you and congratulations.

+8
android android-layout
source share
1 answer

β€œInflation” is a term that refers to parsing XML and turning it into UI-oriented data structures. You can inflate the hierarchy of views, menu structure, and other types of resources. Often this is done behind the scenes with a wireframe (for example, you call setContentView(R.layout.main) ). A typical case when you explicitly inflate something yourself is to create a menu, as described in the Creating a Menu guide.

+18
source share

All Articles