Code example for TabHost

Methods: addViewsetOnTabChangedListenersetup, setLayoutParams

0
	 */ 
	@Override 
	public Widget create(Activity activity, int handle)
	{ 
	     // Construct the tab host that fills the whole screen. 
        TabHost tabHost = new TabHost( activity, null );
        tabHost.setLayoutParams(
        		new LinearLayout.LayoutParams(
                        LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT ) );
 
        // Create the visual structure of the tab host 
        LinearLayout tabRootView = createTabRoot( activity );
        tabHost.addView( tabRootView );
 
        // Must be called when using views instead of activities to fill 
        // a tabs content 
        tabHost.setup( );
 
        tabHost.setOnTabChangedListener( new TabChangeListener( handle ) );
 
		return new TabScreenWidget( handle, tabHost );
	} 
 
	/** 
	 * Creates the visual layout of the whole tabbed screen. 
	 *