how android layout inflate mechanism working in fragment?

こ雲淡風輕ζ 提交于 2020-01-16 03:25:51

问题


I am a beginner about android. For the past 6 months, I have been using the following code to display the layout in listview, fragment and add custom header.

(ViewGroup) inflater.inflate(layout,view, false);

LayoutInflater.from(getActivity()).inflate(layout, null);

But i do not understand the functionality, and what it describes, and how it is working. Please kindly explain those if you know. Sorry for my bad English.


回答1:


I will strongly recommend reading this article

  • Layout inflation as intended


as it is veryinteresting and covers basic stuff and also some common mistakes.



来源:https://stackoverflow.com/questions/18843191/how-android-layout-inflate-mechanism-working-in-fragment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!