问题
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