TabHost tabs = (TabHost)findViewById(R.id.TabHost01);
tabs.setup(getLocalActivityManager());
TabHost.TabSpec search = tabs.newTabSpec("tag1");
search.setContent(new Intent(this,Searchgurbani.class));
search.setIndicator("Find Me");
tabs.addTab(search);
TabHost.TabSpec pref = tabs.newTabSpec("tag5");
pref.setContent(new Intent(this,Preferencegurbani.class));
pref.setIndicator("Settings");
tabs.addTab(pref);
TabHost.TabSpec favorite = tabs.newTabSpec("tag6");
favorite.setContent(new Intent(this,Favroite.class));
favorite.setIndicator("BookMark");
tabs.addTab(favorite);
for(int i=0;i<tabs.getTabWidget().getChildCount();i++)
{
TextView tv = (TextView) tabs.getTabWidget().getChildAt(i).findViewById(android.R.id.title);
tv.setTextColor(Color.parseColor("#ffffff"));
}
tabs.setup(getLocalActivityManager());
TabHost.TabSpec search = tabs.newTabSpec("tag1");
search.setContent(new Intent(this,Searchgurbani.class));
search.setIndicator("Find Me");
tabs.addTab(search);
TabHost.TabSpec pref = tabs.newTabSpec("tag5");
pref.setContent(new Intent(this,Preferencegurbani.class));
pref.setIndicator("Settings");
tabs.addTab(pref);
TabHost.TabSpec favorite = tabs.newTabSpec("tag6");
favorite.setContent(new Intent(this,Favroite.class));
favorite.setIndicator("BookMark");
tabs.addTab(favorite);
for(int i=0;i<tabs.getTabWidget().getChildCount();i++)
{
TextView tv = (TextView) tabs.getTabWidget().getChildAt(i).findViewById(android.R.id.title);
tv.setTextColor(Color.parseColor("#ffffff"));
}
this is right code it's working
ReplyDeleteThank you for your answer. Still your code works like a charm.
ReplyDelete