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 - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -