I need to create application that has three tabs. First tab is MapViewActivity, Second tab is Search.
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tab);
tabHost = getTabHost();
resources = getResources();
AddTab(resources.getString(R.string.tab_tag1),
R.drawable.icon_tab1, MapViewActivity.class);
AddTab(resources.getString(R.string.tab_tag2),
R.drawable.icon_tab2, MapViewActivity.class);
AddTab(resources.getString(R.string.tab_tag3), R.drawable.icon_tab3,
MapViewActivity.class);
}
private void AddTab(String tabName, int idPhoto, Class className) {
TabSpec tabspec = tabHost.newTabSpec(tabName);
tabspec.setIndicator(tabName, getResources().getDrawable(idPhoto));
Intent intent = new Intent(this, className);
tabspec.setContent(intent);
tabHost.addTab(tabspec);
}
But when someone select second tab (Search) I want to show popup inside first tab content.
Is it possible? Do you have some examples?
In your code add this
So it should loke like this
EDIT 2:
you can use