Code example for TabHost.TabSpec

Methods: setContent, setIndicator

0
    } 
     
    private void addTabTotes() { 
        Intent intent = new Intent(this, TasksOverviewActivity.class);
        TabSpec spec = mTabHost.newTabSpec("Totes");
        spec.setIndicator("Totes", mResources
                          .getDrawable(android.R.drawable.ic_menu_agenda));
        spec.setContent(intent);
        mTabHost.addTab(spec);
     } 
     
    private void addTabPendents() { 
        Intent intent = new Intent(this, NotFinishedTasksOverviewActivity.class);
        TabSpec spec = mTabHost.newTabSpec("Pendents");
        spec.setIndicator("Pendents", mResources
                          .getDrawable(android.R.drawable.ic_menu_agenda));
        spec.setContent(intent);
        mTabHost.addTab(spec);
     }  
     
    private void addTabCompletades() {