我已經內置自定義選項卡只能與圖片,現在我需要這個標籤圖像時,用戶交換機從阿拉伯語\英語從另一個活動按鈕,如何更改標籤圖片(未按下)?
改變這裏是我的代碼從選項卡活動
標籤mainTabs = ((TabActivityMy) getParent()).getTabHost();
mainTabs.getTabWidget().setDividerDrawable(null);
Intent intent = new Intent(this, c);
TabHost.TabSpec spec = mainTabs.newTabSpec(null);
View tabIndicator = LayoutInflater.from(this).inflate(R.layout.tab_indicator, ((TabActivityMy) getParent()).getTabHost().getTabWidget(), false);
ImageView icon = (ImageView) tabIndicator.findViewById(R.id.icon);
icon.setImageResource(drawableId);
spec.setIndicator(tabIndicator);
spec.setContent(intent);
mainTabs.addTab(spec);
當我做這個應用程序添加新的選項卡,我知道這個代碼是這樣做,但我只需要改變圖像當前所有標籤
http://store1.up-00.com/2013-12/1386590546791.png –