title: What is the use of "attach to root" in layout inflater?
body: <p>I am a newbie to android, I know this question has already been asked but i couldn't get a satisfactory explanation.
  My doubts are:</p>
  
  <ol>
  <li>What is "attach to root" used for, if possible with a small
  and clear example.</li>
  <li>When I searched for the answer people said its optional used to
  attach to parent view group, What is the view group hierarchy?(Is
  that considering views that we created programatically or is that
  also considering the views that are already declared in an xml file)</li>
  </ol>
  
  <p>I hope the questions is clear, if not please say so in the comments.</p>