Code example for TabHost.TabSpec

Methods: setContent, setIndicator

0
        ctx.postIO(this);
    } 
 
    private void initPanel(String label, int tabViewId) {
        TabSpec tab = mTabHost.newTabSpec(label);
        tab.setContent(tabViewId);
        tab.setIndicator(label);
        mTabHost.addTab(tab);
    } 
 
    @Override 
    public void run() { 
        try { 
            init(); 
        } catch (IOException e) {
            e.printStackTrace();
        } 
    } 
 
    public void init() throws IOException { 
        // Clear previous state