这个我的代码添加了TabHost:
TabHost tabHost = getTabHost();
TabHost.TabSpec tabSpec;
tabSpec = tabHost.newTabSpec("tag1");
tabSpec.setIndicator("My text");
tabSpec.setContent(new Intent(this, listlayout.class));
tabHost.addTab(tabSpec);
tabSpec文本中的setcolor如何?
答案 0 :(得分:2)
试试这种方式
TabHost tabhost = getTabHost();
TextView tv = (TextView) tabhost.getTabWidget().getChildAt(0).findViewById(android.R.id.title);
tv.setTextColor(Color.parseColor("#492353"));