How do I find a view in a dynamically generated Android layout?
<p>I have a <strong>TableLayout</strong> that I'm populating dynamically.</p>

<p>I'm extending <strong>TableRow</strong> and adding a function called getNextSibling();</p>

<p>(unless this is the wrong way to do this, which I'm happy to alter)...</p>

<p>pseudo code:</p>

<pre><code>private TableRow getNextSibling(){
   TableLayout theTable = this.getParent();
   TableRow nextSib = theTable.getChildAt(
                        somehowGetMyIndexOrderInParentTable() + 1);
}
</code></pre>

<p>I'm not sure how to do this gracefully... I can loop through the children looking for which one of them <strong>== this</strong>  and then see if there's a next one... but I'm guessing there's a more elegant way.</p>

<p>All help welcome.</p>
