Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAnas Fahad
16,079 Pointswhat does LayoutInflater exactly do ?
Hi I really didn't understand what LayoutInflater is, also what is LayoutInflater.Factory is it related to Factory Design Pattern ?
Thanks :)
2 Answers
Yeeka Yau
7,410 PointsThe way I think about it is that it grabs that XML file we have set up and allows us to access the views that are contained in that layout.
Yongshuo Wang
5,500 PointsHi,
From my understanding, the LayoutInflater is used to layout a customized xml file into particular view. Such as the list_item.xml.
ian sobo
3,851 Pointshuh?
ian sobo
3,851 Pointsian sobo
3,851 PointsIf this is truly how it works, then by gum you are a master of explaining things my friend!