I have a TabHost, where the tab content is a ViewFlipper:
<TabHost>
<LinearLayout>
<TabWidget />
<FrameLayout>
<!-- <include android:id="@+id/my_view_flipper" layout="@layout/my_viewflipper_layout"/> -->
<com.appz.mobile.android.views.Tab1MyViewFlipper android:id="@+id/my_view_flipper" />
</FrameLayout>
</LinearLayout>
</TabHost>
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 my_viewflipper_layout in Tab1MyViewFlipper.
public class Tab1MyViewFlipper extends ViewFlipper {
public Tab1MyViewFlipper(Context context) {
super(context);
// Add the views from 'my_viewflipper_layout' here
}
}
Any ideas or a better way to structure this?
Thanks for your time.
Ah this was so obvious!
I simply just changed the
ViewFlipperinmy_viewflipper_layoutto use my custom viewflipper class, durrr!