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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

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

ios - I get the error Property '...' not found on object of type '...' -