Sorry for my bad english...
i made a tab bar activity in android application with this code:
TabHost tabHost = (TabHost) findViewById(android.R.id.tabhost);
Intent intent = new Intent(this, Page2.class);
TabHost.TabSpec spec = tabHost.newTabSpec("tab" + labelId);
View tabIndicator = LayoutInflater.from(this).inflate(R.layout.tab_indicator, tabHost.getTabWidget(), false);
TextView title = (TextView) tabIndicator.findViewById(R.id.title);
title.setText(labelId);
ImageView icon = (ImageView) tabIndicator.findViewById(R.id.icon);
icon.setImageResource(drawableId);
spec.setIndicator(tabIndicator);
spec.setContent(intent);
tabHost.addTab(spec);
With this code i can create any tab i want and all tabs call an activity. All works fine, but there is a way to call a function when click (or tap) on a tab instead of call an activity?