See the following code:
Mtabhost = (tabhost) findviewbyid (R. id. tabhost); mtabhost. setup (); Final tabwidget = (tabwidget) findviewbyid (Android. r. id. tabs); layoutinflater inflater_tab1 = layoutinflater. from (this); inflater_tab1.inflate (R. layout. mobile_phone_cashier_tab1, mtabhost. gettabcontentview (); inflater_tab1.inflate (R. layout. mobile_phone_cashier_tab2, mtabhost. gettabcontentview (); inflater_tab1.inflate (R. layout. mobile_phone_cashier_tab3, mtabhost. gettabcontentview (); // inflater_tab1.inflate (R. layout. mobile_phone_cashier_tab4, mtabhost //. gettabcontentview (); // inflater_tab1.inflate (R. layout. mobile_phone_cashier_tab5, mtabhost //. gettabcontentview (); // inflater_tab1.inflate (R. layout. mobile_phone_cashier_tab1_request, // mtabhost //. gettabcontentview (); mtabhost. addtab (mtabhost. newtabspec ("tab1 "). setindicator (getstring (R. string. sy )). setcontent (R. id. framelayout01); mtabhost. addtab (mtabhost. newtabspec ("tab2 "). setindicator (getstring (R. string. CD )). setcontent (R. id. framelayout02); mtabhost. addtab (mtabhost. newtabspec ("tab3 "). setindicator (getstring (R. string. jyjl )). setcontent (R. id. framelayout03); // mtabhost. addtab (mtabhost. newtabspec ("tab4 "). setindicator (// getstring (R. string. yye )). setcontent (R. id. framelayout04); // mtabhost. addtab (mtabhost. newtabspec ("tab5 "). setindicator (// getstring (R. string. jyjl )). setcontent (R. id. framelayout05); tabwidget. setbackgroundresource (R. drawable. tab_bg); field mbottomleftstrip; field mbottomrightstrip; For (INT I = 0; I <tabwidget. getchildcount (); I ++) {final textview TV = (textview) tabwidget. getchildat (I ). findviewbyid (Android. r. id. title); tabwidget. getchildat (I ). getlayoutparams (). height = 40; if (I = 0) {tabwidget. getchildat (I ). setbackgroundresource (R. drawable. tab_kuang); // sets the background TV. settextcolor (color. RGB (202,151, 0);} else {tabwidget. getchildat (I ). setbackgroundresource (R. drawable. tab_bg); TV. settextcolor (color. white); tabwidget. getchildat (I ). setclickable (false);} TV. settextsize (15); TV. setgravity (gravity. center_horizontal | gravity. bottom );}
The principle is to change the built-in tabwidget.