title: Android: Find Fragment within a dynamically created Layout
body: <p>I am trying to get a hold of a fragment that is within a LinearLayout I have created:</p>
  
  <p><strong>Edit:</strong> This is within a class that extends <code>ArrayAdapter&lt;G&gt;</code></p>
  
  <pre><code>LinearLayout newView = new LinearLayout(getContext());
  String inflater = Context.LAYOUT_INFLATER_SERVICE;
  LayoutInflater li;
  li = (LayoutInflater) getContext().getSystemService(inflater);
  li.inflate(resource, newView, true);
  </code></pre>
  
  <p>Within the layout is a fragment called TableRowView:</p>
  
  <p><strong>Edit: I corrected the XML syntax</strong></p>
  
  <pre><code>&lt;fragment android:name ="mypackage.TableRowView"
      android:id="@+id/row"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  </code></pre>
  
  <p>How do I get a hold of <code>newView</code>'s fragment?</p>
  
  <p>Thanks in advance,
  --David</p>