AbHost mTabHost;/** Called when the activity is first created. * // @ Override public void onCreate (Bundle savedInstanceState) {super. onCreate (savedInstanceState); setContentView (R. layout. main); // obtain the TabHost object mTabHost = getTabHost ();/* Add a label for TabHost * // create a newTabSpec (newTabSpec) // set its label and Icon (setIndicator) // set the content (setContent) mTabHost. addTab (mTabHost. newTabSpec ("tab_1 "). setIndicator ("TAB 1", getResour Ces (). getDrawable (R. drawable. img1 )). setContent (R. id. textview1); mTabHost. addTab (mTabHost. newTabSpec ("tab_2 "). setIndicator ("TAB 2", getResources (). getDrawable (R. drawable. img2 )). setContent (R. id. textview2); mTabHost. addTab (mTabHost. newTabSpec ("tab_3 "). setIndicator ("TAB 3", getResources (). getDrawable (R. drawable. img3 )). setContent (R. id. textview3); // set the background color of TabHost mTabHost. setBackgroundColor (Color. Argb (150, 22, 70,150); // sets the background image resource mTabHost for TabHost. setBackgroundResource (R. drawable. bg0); // set which label is currently displayed mTabHost. setCurrentTab (0); // tag switching event processing, setOnTabChangedListener mTabHost. setOnTabChangedListener (new OnTabChangeListener () {@ Override public void onTabChanged (String tabId) {}});} transfer to core issues. 1. Change the title icon of TabHost. First, we should get the Layout View and the corresponding control. The icon should be ImageView, and the text should be TextView. The Code is as follows: View mView = mTabHost. getTabWidget (). getChildAt (0); // 0 indicates the first TabImageView imageView = (ImageView) mView. findViewById (Android. r. id. icon); // obtain the control imageViewimageView. setImageDrawable (getResources (). getDrawable (R. drawable. img3); // change the image view = (imageView) mTabHost. getTabWidget (). getChildAt (1 ). findViewById (Android. r. id. icon); imageView. setImageDrawable (getResources (). getDrawable (R. drawable. img 2); imageView = (ImageView) mTabHost. getTabWidget (). getChildAt (2 ). findViewById (Android. r. id. icon); imageView. setImageDrawable (getResources (). getDrawable (R. drawable. img1); 2. change the title of TabHost. TextView textview = (TextView) mTabHost. getTabWidget (). getChildAt (0 ). findViewById (Android. r. id. title); textview. setTextSize (1); textview = (TextView) mTabHost. getTabWidget (). getChildAt (1 ). findViewById (Android. r. id. title); textview. setTextSize (2); textview = (TextView) mTabHost. getTabWidget (). getChildAt (2 ). findViewById (Android. r. id. title); textview. setTextSize (3); in fact, after obtaining the View, we can also set the title Color, Font, font size, and so on.