Extending a View and adding views to the layout from XML
<p>I have a TabHost, where the tab content is a ViewFlipper:</p>

<pre><code>&lt;TabHost&gt;
    &lt;LinearLayout&gt;
    &lt;TabWidget /&gt;
    &lt;FrameLayout&gt;           
        &lt;!-- &lt;include android:id="@+id/my_view_flipper" layout="@layout/my_viewflipper_layout"/&gt; --&gt;
        &lt;com.appz.mobile.android.views.Tab1MyViewFlipper android:id="@+id/my_view_flipper" /&gt;
    &lt;/FrameLayout&gt;
    &lt;/LinearLayout&gt;
&lt;/TabHost&gt;
</code></pre>

<p>The commented out line in the XML is the current implementation which works just fine. I want to now use my own ViewFlipper class but I can't figure out how to include the <code>my_viewflipper_layout</code> in Tab1MyViewFlipper.</p>

<pre><code>public class Tab1MyViewFlipper extends ViewFlipper {
    public Tab1MyViewFlipper(Context context) {
        super(context);
        // Add the views from 'my_viewflipper_layout' here
    }
}
</code></pre>

<p>Any ideas or a better way to structure this?</p>

<p>Thanks for your time.</p>
