I'm still very new to Android, but I am trying to keep up by using tutorials on YouTube. A bunch of people throw around the phrase "inflate the xml". I started to use this phrase as well, and I feel as though I'm not doing it right.
The only time I say "inflate the xml" is when telling someone to write the code to use a widget from the xml in java code.
So if I see a button on someones layout, with the id of button01
, and I tell them to "inflate the xml" I expect Button mybutton = (Button) findViewById(R.id.button01);
Is this wrong of me?
EDIT: It seems as though this is not the correct phrase. Does one exist?
View view = getLayoutInflater().inflate(R.layout.mylayout);
That line is not needed to writeButton mybutton = (Button) view.findViewById(R.id.button01);
is it? Have I been doing something fundamentally incorrect this entire time? – Suzy