java - how to set custom tabhost style without TabActivity -


i set tab without tabactivity, tabhost has error. please tell me how do. thanks.

private void setuptab(class<?> ccls, string name, string label,         integer iconid) {     intent intent = new intent().setclass(this, ccls);      view tab = layoutinflater.from(this).inflate(r.layout.custom_tab, null);     imageview image = (imageview) tab.findviewbyid(r.id.icon);     textview text = (textview) tab.findviewbyid(r.id.text);     if (iconid != null) {         image.setimageresource(iconid);     }     text.settext(label);      tabspec spec = tabhost.newtabspec(name).setindicator(tab)             .setcontent(intent);     tabhost.addtab(spec);  } 

i read android tab-host earn

it can't build. i'm run error tabhost cannot resolved.


Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -